News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

C| Code debug problem

Started by valeryf2, June 30, 2019, 07:10:41 PM

Previous topic - Next topic

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:
||=== 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)) ===|

oBFusCATed

Press rebuild and it will work. Or use different object file folders for different OSes (you'll have to use different targets).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

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:
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.


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??
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:
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.


Known problem. Search the forum.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

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.

valeryf2


valeryf2

Quote from: oBFusCATed on June 30, 2019, 08:56:08 PM
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??
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:
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.


Known problem. Search the forum.
ok thanks =)