User forums > Using Code::Blocks
Adding files to project
MannyMoe:
BlueHazzard:
Thanks again for the reply. I believe this is getting way over my head.
I don't think I can follow what you are saying. I believe this is something
I need to stay away from. I am afraid I will really mess things up! This is
my first time trying to make a project file using codeblocks. I have been
going to the directory and running my programs from there. I thought
it would be nice to be able to run them from the Desktop. I need to learn
much more than I know right now! Thanks again for your time. It is nice
to see that you seem to know a great deal. Have a wonderful day my friend!
BlueHazzard:
I do not understand your fear about projects. They are exactly the same as if you build one single file, except that you manage your build a bit.
With all your writing you did not add any information that makes it easier to help you. Instead of whinging about how complicated projects are and how you still have to learn you can simply answer the questions and we will guide you through your problem. It is not rocket science...
To make it even a bit more easier, some checklist you can answer:
1) What library do you use for your user interface? (wxWidgets, GTK, QT...)
1.1) Does this library is linked statically or dynamically?
1.2) How do you installed this library? Was it on the system? Through the packet manager?
2) How do you load the image file?
2.1) What function do you use to load the file
2.2) How do you specify the path to the file you load?
2.3) What do you do if the loading of the file fails?
2.4) Where is the file located? Relative to your executable?
MannyMoe:
BlueHazzard:
I am sorry for some of the things I said! I did not mean any disrespect. I just do
not know how to answer some of your questions. Here are some things that might
help you:
I do not use anything fancy. I only use codeblocks, allegro5 and opengl for my programs.
I use only their functions to load my images. All my programs run perfectly from their
directories. You are correct about the problem being the path to the images. When I load
an image, if I include the absolute path to the image and then compile, link, and copy to
the desktop all is perfect. I know this is not the correct way to do things, but it works.
For the first time in my life I tried to use the Debugger. This is what it reported:
warning: GDB: failed to set controlling terminal: operation not permitted
The last thing I did that really made a difference was to set the working directory to the
place where my programs were located.
All my programs are single files. The only reason to get involved with a project was so I
could run them from my desktop.
As far as static or dynamic. I have no idea.
All the libraries and header files are in their correct place and are working perfectly.
The project file (cbp file) is located in a subdirectory of the working directory.
Hope this helps. I will try to stay calm in order to see this thing done!
Thanks and have a great day!
BlueHazzard:
--- Quote --- I am sorry for some of the things I said! I did not mean any disrespect
--- End quote ---
This was not disrespectful to me, but to yourself. You have to have some confidence ;)
--- Quote --- You are correct about the problem being the path to the images.
--- End quote ---
Great! Now you know how to solve it :)
--- Quote ---GDB: failed to set controlling terminal: operation not permitted
--- End quote ---
This should be harmless. If you have other problems during debugging, make sure you enable debug symbols:
Select the "Debug" target from "Build->Select target" and make a rebuild "Build->Rebuild"
Or enable it in the compiler options: Project->build options->Select your project name on the left->Set a tick at the -g flag->hit ok and rebuild with Build->Rebuild
And if you still have problems please post a full build log and a debugger log from the debugger tab
--- Quote ---Thanks and have a great day!
--- End quote ---
same to you!
MannyMoe:
BlueHazzard:
OK! I did what you said and everything is good. No errors of
any kind! I did run into something the other day I might point
out: LD_LIBRARY_PATH = $LD_LIBRARY_PATH: .
Just a period. I tried to find it again but could not. This may tell
the story right there.
When I went to the Debug directory and clicked on the executable,
same thing again: screen blinks and turns black. I believe that PATH
needs to be corrected but I could not find it.
Also, do I need to upgrade my version of codeblocks or do you think
version 13.12 is ok for what I do?
I might add when I did a rebuild, nothing happened. In checking the
messages, it said everything was up to date. Nothing needed to be done.
Are you one of the developers of codeblocks? Just asking.
Hope all is going well on your end!!!!!!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version