User forums > Help

Project not working when copying it to different pc

(1/2) > >>


as the title suggests I've run into a little problem lately.

I'm using both a Win10 PC as well as a Laptop running Ubuntu 20.04 to code and I'm transferring the projects between these 2 via git.
Now the problem is that everytime I pull the git-repo and try to open and build the project in codeblocks i get tons of errors (i. e. "undefined reference to main", etc.). This isn't a big problem though because when i cut out all the code from the project, build and paste the code back into codeblocks it works exactly like how it's supposed to.

My question is, is this generally a problem in codeblocks or is it a problem on my end? And if it's the latter is there any known cause (or in turn solution) to this problem?

Please excuse me if this is a dumb question, but as someone who has used codeblocks for less than a week it seems a little weird.

Thanks in advance,

It is not a normal problem to have.
So, you likely did something wrong.

Post a build log.

Possible link; my internet is not responding with the link either the server or my end is having issues.

WARNING: Do not add *.depend to git it is not considered the proper thing to do. I have no idea if doing that could cause this issue.

Tim S.

Do you have you executable and object files (.objs folder) in the git repo?
If you have them this would explain the strange behaviour.
Does a full rebuild (Build -> Rebuild) fix the problem?

Hey thanks for the replies.

@oBFusCATed: ty that seemed to be the problem. I had to tamper with the .gitattributes file to be able to transfer the exe via git.

Now I feel dumb for not looking for something like that myself

Storing the exe in git is generally not a good idea. Git is not good at handling binary files.
If you want to share the exe and object files, make sure to have different folders for different OSes.


[0] Message Index

[#] Next page

Go to full version