Author Topic: Compiling with Netbeans?  (Read 5299 times)

Offline Muukalainen

  • Captain
  • ***
  • Posts: 94
    • View Profile
Compiling with Netbeans?
« on: July 11, 2014, 07:40:25 pm »
Does anyone here use Netbeans to compile Openxcom?

I tried to wrestle 3 hours last night with it, but could not get it to work. I think it could not find the SDL files.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Compiling with Netbeans?
« Reply #1 on: July 11, 2014, 09:37:00 pm »
What compiler & OS you use? I managed in hacky way to compile from Netbeans IDE (using MinGW compiler).

Offline Muukalainen

  • Captain
  • ***
  • Posts: 94
    • View Profile
Re: Compiling with Netbeans?
« Reply #2 on: July 11, 2014, 09:56:40 pm »
I think I set up the Cygwin. I googled c++ and Netbeans and the tutorials said that you either install Cygwin or that MinGW. It was strange, but I got the c++ hello world working.

And on Windows 7 64-bit.

----

I noticed all the tips and tutorials were for VS so I installed it. Though I accidentally selected newer version, express 2013.

Now I have a problem when trying to debug, it says yaml is missing on my computer.

I have made some simple games, tetris and space invaders, but "setting up all the libraries" (not even sure what words I should use) has always been absolute hell for me.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Compiling with Netbeans?
« Reply #3 on: July 11, 2014, 10:57:32 pm »
One problem with Cygwin is trying to by compatible with Linux systems. This will require for you to install Cygwin SDL libs (if they are available) not MinGW or VS. MinGW on the other side dont try be linux-like and embrace windows fully.

With VS I cant help you because I dont use it. But there some peole had problems with it too, you should search forum for their posts.

Offline Muukalainen

  • Captain
  • ***
  • Posts: 94
    • View Profile
Re: Compiling with Netbeans?
« Reply #4 on: July 12, 2014, 12:47:23 am »
Yes, it was linux madness.

I removed Cygwin and installed MinGW. It is no longer crying about the SDL.

But now I have problem with Makefile. It does not compile the code. And every time I open the project it takes a loooong time "parsing openxcom-master".

----

Edit:

I installed cmake and made some progress (hopefully).

Now I get this when trying to run the program:

[31mLinking CXX executable ../bin/openxcom.exe
D:/C/OpenXcom-master/OpenXcom-master/deps/lib/Win32\SDLmain.lib(./Release/SDL_win32_main.obj):(.text[_main]+0x0): multiple definition of `main'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib\libmingw32.a(main.o):e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src/src/libcrt/crt/main.c:42: first defined here
Warning: corrupt .drectve at end of def file
CMakeFiles/openxcom.dir/objects.a(AlienBAIState.cpp.obj): In function `ZN4YAML6detail13memory_holder11create_nodeEv':
D:/C/OpenXcom-master/OpenXcom-master/deps/include/yaml-cpp/node/detail/memory.h:32: undefined reference to `YAML::detail::memory::create_node()'
CMakeFiles/openxcom.dir/objects.a(AlienBAIState.cpp.obj): In function `ZN4YAML6detail8node_ref12mark_definedEv':
D:/C/OpenXcom-master/OpenXcom-master/deps/include/yaml-cpp/node/detail/node_ref.h:29: undefined reference to `YAML::detail::node_data::mark_defined()'
CMakeFiles/openxcom.dir/objects.a(AlienBAIState.cpp.obj): In function `ZN4YAML6detail8node_ref8set_nullEv':
D:/C/OpenXcom-master/OpenXcom-master/deps/include/yaml-cpp/node/detail/node_ref.h:34: undefined reference to `YAML::detail::node_data::set_null()'
CMakeFiles/openxcom.dir/objects.a(AlienBAIState.cpp.obj): In function `ZN4YAML6detail8node_ref10set_scalarERKSs':
D:/C/OpenXcom-master/OpenXcom-master/deps/include/yaml-cpp/node/detail/node_ref.h:35: undefined reference to `YAML::detail::node_data::set_scalar(std::string const&)'
CMakeFiles/openxcom.dir/objects.a(AlienBAIState.cpp.obj): In function `ZN4YAML4Node10AssignDataERKS0_':
D:/C/OpenXcom-master/OpenXcom-master/deps/include/yaml-cpp/node/impl.h:254: undefined reference to `YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)'
CMakeFiles/openxcom.dir/objects.a(AlienBAIState.cpp.obj): In function `ZNK4YAML5as_ifIbbEclERKb':

...and it continues like that for a long.
« Last Edit: July 12, 2014, 01:58:00 am by Muukalainen »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Compiling with Netbeans?
« Reply #5 on: July 12, 2014, 03:13:37 am »
You didnt link Yaml library. I had same problem, I fix it by compiling yaml with OXC, rough hack but working (only drawback its require some files from Boost). You should try configure linker to add yaml binary files to your exe.

Offline Muukalainen

  • Captain
  • ***
  • Posts: 94
    • View Profile
Re: Compiling with Netbeans?
« Reply #6 on: July 13, 2014, 01:52:18 am »
I have to raise my hands and give up with Netbeans and VC-2013. Wasted over 10 hours trying to get them working.

Finally I decided to try with VC2010 and no problems at all :)