User forums > Using Code::Blocks
Transfering project from VS to CodeBlocks
BlueHazzard:
--- Quote from: user321 on June 02, 2013, 10:35:15 pm ---If I press "Keep this relative path"> Yes while adding library, then I get error ld.exe||cannot find -lVJoy.lib
If I press "Keep this relative path"> No while adding library, then I get following error :
obj\Debug\x\main.o||In function `main':|
\main.cpp|12|undefined reference to `_imp___Z15VJoy_InitializePcS_@8'|
\main.cpp|20|undefined reference to `_imp___Z19VJoy_UpdateJoyStateiP15_JOYSTICK_STATE@8'|
\main.cpp|22|undefined reference to `_imp___Z13VJoy_Shutdownv@0'|
||=== Build finished: 3 errors, 0 warnings (0 minutes, 0 seconds) ===|
--- End quote ---
Can you post the build log? Not the build Messages but the build log!
user321:
--- Quote from: MortenMacFly on June 03, 2013, 10:32:32 pm ---
--- Quote from: user321 on June 03, 2013, 08:39:03 pm ---For me crash happens like that.
--- End quote ---
Samples and steps to reproduce please, otherwise you producing forum noise and we cant help.
--- End quote ---
Here is short video of how it happens : http://www.mediafire.com/download/q9ku3l755ynlwu5/crash2.7z
--- Quote from: BlueHazzard on June 03, 2013, 11:08:44 pm ---
--- Quote from: user321 on June 02, 2013, 10:35:15 pm ---If I press "Keep this relative path"> Yes while adding library, then I get error ld.exe||cannot find -lVJoy.lib
If I press "Keep this relative path"> No while adding library, then I get following error :
obj\Debug\x\main.o||In function `main':|
\main.cpp|12|undefined reference to `_imp___Z15VJoy_InitializePcS_@8'|
\main.cpp|20|undefined reference to `_imp___Z19VJoy_UpdateJoyStateiP15_JOYSTICK_STATE@8'|
\main.cpp|22|undefined reference to `_imp___Z13VJoy_Shutdownv@0'|
||=== Build finished: 3 errors, 0 warnings (0 minutes, 0 seconds) ===|
--- End quote ---
Can you post the build log? Not the build Messages but the build log!
--- End quote ---
-------------- Build: Win32 Release in VJoy (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -o "...\VJoySDK\VJoy SDK\C++\Release\VJoy.exe" Release\StdAfx.o Release\VJoy.o -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lcomctl32
Release\VJoy.o:VJoy.cpp:(.text.startup+0x1d): undefined reference to `_imp___Z15VJoy_InitializePcS_@8'
Release\VJoy.o:VJoy.cpp:(.text.startup+0x23): undefined reference to `_imp___Z13VJoy_Shutdownv@0'
Release\VJoy.o:VJoy.cpp:(.text.startup+0x79): undefined reference to `_imp___Z19VJoy_UpdateJoyStateiP15_JOYSTICK_STATE@8'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings (0 minutes, 0 seconds)
BlueHazzard:
--- Quote from: user321 on June 03, 2013, 11:25:29 pm ----------------- Build: Win32 Release in VJoy (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -o "...\VJoySDK\VJoy SDK\C++\Release\VJoy.exe" Release\StdAfx.o Release\VJoy.o -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lcomctl32
Release\VJoy.o:VJoy.cpp:(.text.startup+0x1d): undefined reference to `_imp___Z15VJoy_InitializePcS_@8'
Release\VJoy.o:VJoy.cpp:(.text.startup+0x23): undefined reference to `_imp___Z13VJoy_Shutdownv@0'
Release\VJoy.o:VJoy.cpp:(.text.startup+0x79): undefined reference to `_imp___Z19VJoy_UpdateJoyStateiP15_JOYSTICK_STATE@8'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings (0 minutes, 0 seconds)
--- End quote ---
i think you miss VJoy.lib so, add it under Project->Build Options->Linker Settings
Add in Project->Build Options->Search Directories->Linker the path to the lib, and if it fails again post again the build log
thx
user321:
--- Quote from: BlueHazzard on June 03, 2013, 11:39:05 pm ---
i think you miss VJoy.lib so, add it under Project->Build Options->Linker Settings
Add in Project->Build Options->Search Directories->Linker the path to the lib, and if it fails again post again the build log
thx
--- End quote ---
check first post:
--- Quote from: user321 on June 02, 2013, 10:35:15 pm ---If I press "Keep this relative path"> Yes while adding library, then I get error ld.exe||cannot find -lVJoy.lib
If I press "Keep this relative path"> No while adding library, then I get following error :
obj\Debug\x\main.o||In function `main':|
\main.cpp|12|undefined reference to `_imp___Z15VJoy_InitializePcS_@8'|
\main.cpp|20|undefined reference to `_imp___Z19VJoy_UpdateJoyStateiP15_JOYSTICK_STATE@8'|
\main.cpp|22|undefined reference to `_imp___Z13VJoy_Shutdownv@0'|
||=== Build finished: 3 errors, 0 warnings (0 minutes, 0 seconds) ===|
--- End quote ---
I already linked it, but for some reason it asks me do I want to keep this relative path to linker... dunno what that means :S I tried both options, but noone of them work ???
BlueHazzard:
Keep this relative path> No
Keep relative path means, it saves the path relative to your project folder
No means it uses an absolute path.
For me adding only the library without path, and then adding the path in the Search path from the linker worked always.
--- Quote from: BlueHazzard on June 03, 2013, 11:08:44 pm ---Add in Project->Build Options->Search Directories->Linker the path
Can you post the build log? Not the build Messages but the build log!
--- End quote ---
Don't forget FULL BUILD LOG FROM BUILD MESSAGES
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version