Author Topic: Trouble building wxLauncher  (Read 2798 times)

0 Members and 1 Guest are viewing this topic.

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Trouble building wxLauncher
When I try to build wxLauncher in Eclipse, it compiles fine but linking fails with a bunch of undefined references.
I know Eclipse isn't officially supported, but I can't and don't want to use Visual Studio.
I installed wxWidgets 3.1.0 and built it with "mingw32-make -f makefile.gcc", and the WXWIN environment variable set to the root directory.  CMake is set to build a binary zip.
Here is what shows up during linking:  http://pastebin.com/aNu48JQd
Has anyone else had this problem on Windows and/or Eclipse, and how did you fix it?
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Trouble building wxLauncher
I haven't used Eclipse on Windows, but I did have a heap of similar issue building with with MSVC/cmake/etc, I can't remember the precise details but I had to fiddle around with library settings in cmake before it started building & linking correctly.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
Do you remember whether you had to go into advanced settings?  Whenever I change one of the non-advanced library paths, it pops up an error when I configure.
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Trouble building wxLauncher
I think I did go into the advanced settings; but I don't recall if that was really necessary. Sorry! Not very helpful, I'll see if I can have a look at my saved cmake config & get back to you.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
Any luck niffiwan?
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Trouble building wxLauncher
Without seeing your compile options, it looks like you either are building release but have selected a debug wxWidgets.

Based on this you also may not be linking the CRT (or are liking a mismatch debug/release version)
Code: [Select]
C:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:65: undefined reference to `GetFileVersionInfoSizeW'
C:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:69: undefined reference to `GetFileVersionInfoW'
C:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:73: undefined reference to `VerQueryValueW'

Having said that, I haven't tried building wxWidgets with anything other than VisualC on Windows so I have no idea what other incompatibilities you may run into.  In particular make sure that cmake has not detected you as being linux (IS_WIN32 vs IS_LINUX).  Please pastebin your CMakeCache.txt.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
CMakeCache.txt at http://pastebin.com/sZiqFZ76.
I don't have either IS_WIN32 or IS_LINUX.
I've tried building with wxWidgets release and with wxWidgets_CONFIGURATION to mswu, but got the same results.
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
I made sure I was using wxWidgets release and mswu configuration.  Then I tried including C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um from inside Eclipse and adding an environment variable, but it still failed.  Maybe this path needs to be set inside CMake, but I don't know where.
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
I found this thread https://forums.wxwidgets.org/viewtopic.php?t=42617#p172992 where the solution was to add libshlwapi.a and libversion.a (MinGW equivalents to Windows SDK files) to the linker input files.  I assume this means CMakeLists.txt, and I'm now trying to figure out how to do that.
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

  

Offline Iss Mneur

  • 210
  • TODO:
Re: Trouble building wxLauncher
I found this thread https://forums.wxwidgets.org/viewtopic.php?t=42617#p172992 where the solution was to add libshlwapi.a and libversion.a (MinGW equivalents to Windows SDK files) to the linker input files.  I assume this means CMakeLists.txt, and I'm now trying to figure out how to do that.
This line would be what you are looking for: https://github.com/scp-fs2open/wxLauncher/blob/master/CMakeLists.txt#L394
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
I added C:\Program Files\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\x86_64-w64-mingw32\lib as an environment variable and edited CMakeLists.txt as follows:
Code: [Select]
find_library(SHLWAPI libshlwapi.a)
find_library(MINCORE libversion.a)

target_link_libraries(wxlauncher ${wxWidgets_LIBRARIES} ${SDL2_LIBRARIES} ${SHLWAPI} ${MINCORE})
This made two new variables in the CMake gui called SHLWAPI and MINCORE, which I manually set to C:\\Program\ Files\\mingw-w64\\x86_64-6.3.0-posix-seh-rt_v5-rev1\\mingw64\\x86_64-w64-mingw32\\lib\\libshlwapi.a and C:\\Program\ Files\\mingw-w64\\x86_64-6.3.0-posix-seh-rt_v5-rev1\\mingw64\\x86_64-w64-mingw32\\lib\\libversion.a respectively.
The Windows library errors are gone but I still have the reference problems with wxWidgets.
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Trouble building wxLauncher
Reference problems?

Please paste an updated output
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
I had to link the libraries in the correct order, so I replaced
Code: [Select]
target_link_libraries(wxlauncher ${wxWidgets_LIBRARIES} ${SDL2_LIBRARIES} ${SHLWAPI} ${MINCORE})with
Code: [Select]
target_link_libraries(wxlauncher ${wxWidgets_LIBRARIES} ${MINCORE})
target_link_libraries(wxlauncher ${wxWidgets_LIBRARIES} ${SHLWAPI})
target_link_libraries(wxlauncher ${SDL2_LIBRARIES} ${MINCORE})
target_link_libraries(wxlauncher ${SDL2_LIBRARIES} ${SHLWAPI})
target_link_libraries(wxlauncher ${wxWidgets_LIBRARIES} ${SDL2_LIBRARIES})
It now builds properly, but doesn't run.
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Trouble building wxLauncher
No exceptions? No log? Nothing on the console?  No Dr Watson?
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
Both double-clicking and running from command prompt produce the attached popup box, with no output on the console.  Also, DrWatson doesn't show up.
Edit:  I think I built a 64-bit wxL, which would conflict with my existing 32-bit installation.

[attachment stolen by Russian hackers]
« Last Edit: March 16, 2017, 12:02:03 am by PIe »
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
I built the Install target and it works, except for actually launching FSO.  I get an error about creating a registry key.  Also, I have to click through some errors and it looks a little weird, but everything except playing the game seems to work
Thanks so much Iss.  I really appreciate it.

[attachment stolen by Russian hackers]
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull:

 

Offline m!m

  • 211
Re: Trouble building wxLauncher
The second error is caused by a bug in wxWidgets and an invalid mod.ini file. If you update to wxWidgets 3.1 it should be fixed. The second issue would probably be fixed by using a nightly build of FSO. The previous versions depended on some weird registry hacking which probably doesn't work with MinGW.

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Trouble building wxLauncher
The second error is caused by a bug in wxWidgets and an invalid mod.ini file. If you update to wxWidgets 3.1 it should be fixed. The second issue would probably be fixed by using a nightly build of FSO. The previous versions depended on some weird registry hacking which probably doesn't work with MinGW.
I tried removing all my mods and I'm already using 3.1, but the error is still there.  Using a nightly did make it playable, thanks.
[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

[9:50 PM] Sottises: wait did you do vassago's verge?
[9:50 PM] Sottises: .. dirge?
[9:50 PM] Axem: yes
[9:50 PM] Sottises: ohh
[9:50 PM] Sottises: well I have that and JAD too
[9:50 PM] Axem: :)
[9:50 PM] Sottises: what a contrast of themes lmao
[9:50 PM] Axem: isnt it
[9:51 PM] Axem: super grimdark thriller about unknowable alien intelligence and over the top colorful action about friendship
[9:51 PM] PIe: jad is grimdark???
[9:51 PM] Axem: :skull: