Trying to compile vssetup in visual c++ 2003 toolkit (first time in over 2 years that I've tried doing that), I get:
setup.cpp
..\..\vegastrike\setup\src\c\setup.cpp(208) : error C2065: 'HOMESUBDIR' : undeclared identifier
..\..\vegastrike\setup\src\c\setup.cpp(208) : error C2228: left of '.c_str' must have class/struct/union type
type is ''unknown-type''
vssetup doesn't build in visual c++/Windows
-
- Confed Special Operative
- Posts: 381
- Joined: Thu Jan 31, 2008 3:25 am
- Location: hiding in a dark corner
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
Re: vssetup doesn't build in visual c++/Windows
Go to line 207 and swap the "chdir" with the last #endif -- that is, keep it within the #ifndef _WIN32.
That was a last minute fix I made after the 0.5.0 Windows release was already out, in order to move the "chdir" after the "mkdir" in non-windows systems (otherwise, it would fail to find the directory the first time around before making it).
On Windows, we do not use home directories, so the vegastrike.config is saved directly in the data folder.
That was a last minute fix I made after the 0.5.0 Windows release was already out, in order to move the "chdir" after the "mkdir" in non-windows systems (otherwise, it would fail to find the directory the first time around before making it).
On Windows, we do not use home directories, so the vegastrike.config is saved directly in the data folder.
-
- Confed Special Operative
- Posts: 381
- Joined: Thu Jan 31, 2008 3:25 am
- Location: hiding in a dark corner
Re: vssetup doesn't build in visual c++/Windows
That worked. However I still can't get the compile to finish. This time, at the final linking stage I get:
display_gtk.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteA@24 referenced in function "void __cdecl myexit(int)" (?myexit@@YAXH@Z)
(edit) Ahh, got it. You need to add shell32.lib from the PSDK manually as an external dependency to the linker. Now it links cleanly.
display_gtk.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteA@24 referenced in function "void __cdecl myexit(int)" (?myexit@@YAXH@Z)
(edit) Ahh, got it. You need to add shell32.lib from the PSDK manually as an external dependency to the linker. Now it links cleanly.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
make: *** No rule to make target 'me'. Stop.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
Re: vssetup doesn't build in visual c++/Windows
If that's the only error, it may be easier to get the function dynamically using LoadLibrary... and I think that ShellExecute call is only used for loading the readme file in notepad. It should be safe to comment out.