User forums > Using Code::Blocks
C| Code debug problem
valeryf2:
Hi,
I wrote a code on windows machine, and then stored the workspace on Google Drive.
now i am trying to build the same workspace on a Mac (Mojave ver.) machine.
and when i press the "run and build" button this is the warning that i get:
--- Code: ---||=== Build: Debug in Avrge_Sales_on_a_day (compiler: GNU GCC Compiler) ===|
||warning: ignoring file obj/Debug/main.o, file was built for unsupported file format ( 0x4C 0x01 0x0B 0x00 0x00 0x00 0x00 0x00 0xE0 0x06 0x00 0x00 0x1A 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): obj/Debug/main.o|
||=== Build failed: 0 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
--- End code ---
oBFusCATed:
Press rebuild and it will work. Or use different object file folders for different OSes (you'll have to use different targets).
valeryf2:
But i want to use both machines... what is the point if i cant use my updates from my main or second machine??
i tried to rebuild and that was the error that showed up on terminal:
--- Code: ---Last login: Sun Jun 30 21:45:08 on ttys000
/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/valery-mac/Google Drive/Thenewboston_program learning/C_learn/Programs/Avrge_sales_on_a_day/Avrge_Sales_on_a_day/bin/Debug/Avrge_Sales_on_a_day
valeryfdmansMBP:~ valery-mac$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/valery-mac/Google Drive/Thenewboston_program learning/C_learn/Programs/Avrge_sales_on_a_day/Avrge_Sales_on_a_day/bin/Debug/Avrge_Sales_on_a_day
sh: /Users/valery-mac/Google: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.
--- End code ---
oBFusCATed:
--- Quote from: valeryf2 on June 30, 2019, 08:49:17 pm ---what is the point if i cant use my updates from my main or second machine??
--- End quote ---
If you share incompatible files there is no way it is going to work. So you have to either not share these files or store them in an os dependent location. It is up to you. Obviously .o files produced on windows doesn't work on linux or macos.
--- Quote from: valeryf2 on June 30, 2019, 08:49:17 pm ---
i tried to rebuild and that was the error that showed up on terminal:
--- Code: ---Last login: Sun Jun 30 21:45:08 on ttys000
/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/valery-mac/Google Drive/Thenewboston_program learning/C_learn/Programs/Avrge_sales_on_a_day/Avrge_Sales_on_a_day/bin/Debug/Avrge_Sales_on_a_day
valeryfdmansMBP:~ valery-mac$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/valery-mac/Google Drive/Thenewboston_program learning/C_learn/Programs/Avrge_sales_on_a_day/Avrge_Sales_on_a_day/bin/Debug/Avrge_Sales_on_a_day
sh: /Users/valery-mac/Google: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.
--- End code ---
--- End quote ---
Known problem. Search the forum.
sodev:
You are writing native code, it is dependend on the target, and since windows and macos are far away from beeing compatible this can never work.
But this doesnt matter, the source code does matter, and this of course can be shared. Just dont share the binaries, especially not the intermediate object files.
Navigation
[0] Message Index
[#] Next page
Go to full version