View previous topic - View next topic |
Author |
Message |
Captain Vimes Grumble Teddy
Joined: 12 May 2006 Posts: 225 Location: The City Streets
|
Posted: Mon Mar 02, 2009 6:33 pm Post subject: Code::Blocks |
[quote] |
|
Okay, experimenting with Code::Blocks IDE. I'm just trying to run a basic program. I've fixed all the errors but one, which isn't in my program. It's something to do with the compiler.
The error message I'm getting is
E:/Apps/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../crt2.o:crt1.c:(.text+0x167): undefined reference to `___cpu_features_init'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings
What does this mean and how do I fix it? _________________ "Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Mar 02, 2009 7:44 pm Post subject: |
[quote] |
|
You probably have auto-detected wrong version of GCC in your environment. This can happen if you have Dev-C++ installed. Check "Settings->Compiler and debugger...->Search directories" and "Settings->Compiler and debugger...->Toolchain executables"
if that doesn't solve it; then uninstall dev-c++ and code::blocks
and then re-install code::blocks.
(edit)
what it means is that you are not linking your code with a required library that implements whatever function its balking at. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Ninkazu Demon Hunter
Joined: 08 Aug 2002 Posts: 945 Location: Location:
|
Posted: Mon Mar 02, 2009 7:46 pm Post subject: |
[quote] |
|
copy crt1.o/crt2.o from dev-cpp\lib to mingw\lib (or codeblocks\lib ?? if you used "codeblocks+minGW installer")
So sayeth Google.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Mar 02, 2009 7:50 pm Post subject: |
[quote] |
|
Ninkazu wrote: | copy crt1.o/crt2.o from dev-cpp\lib to mingw\lib (or codeblocks\lib ?? if you used "codeblocks+minGW installer")
So sayeth Google. |
don't copy the dev-cpp libs to codeblocks.
they use a different version and it will corrupt. go uninstall dev-c++, codeblocks and reinstall codeblocks with its mingw install. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Captain Vimes Grumble Teddy
Joined: 12 May 2006 Posts: 225 Location: The City Streets
|
Posted: Tue Mar 03, 2009 7:24 pm Post subject: |
[quote] |
|
Well, I'm running Dev-C++ and Code::Blocks off my thumb drive. How does that work for reinstalling? _________________ "Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Tue Mar 03, 2009 7:35 pm Post subject: |
[quote] |
|
Captain Vimes wrote: | Well, I'm running Dev-C++ and Code::Blocks off my thumb drive. How does that work for reinstalling? |
you installed them to your thumb drive then just re-install them... _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Captain Vimes Grumble Teddy
Joined: 12 May 2006 Posts: 225 Location: The City Streets
|
Posted: Sun Mar 08, 2009 11:22 pm Post subject: |
[quote] |
|
Okay. So, after much trial and error, I've got rid of that error. But I'm thinking that making images work in Code::Blocks is a little different. I'm using the same game engine/sprite files that I did in the last project, but the game engine is being stubborn and not drawing anything. Is there any special thing I need to do to add pictures to a project in Code::Blocks? _________________ "Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Sun Mar 08, 2009 11:54 pm Post subject: |
[quote] |
|
Captain Vimes wrote: | Okay. So, after much trial and error, I've got rid of that error. But I'm thinking that making images work in Code::Blocks is a little different. I'm using the same game engine/sprite files that I did in the last project, but the game engine is being stubborn and not drawing anything. Is there any special thing I need to do to add pictures to a project in Code::Blocks? |
Make sure that the working directory is setup for your project.
Check project properties.
if your game executable is not able to find the graphics files..how did you think it would work? ;) _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Captain Vimes Grumble Teddy
Joined: 12 May 2006 Posts: 225 Location: The City Streets
|
Posted: Mon Mar 09, 2009 12:07 am Post subject: |
[quote] |
|
Check the project files for what? And what exactly is a working directory?
I feel like such a noob. _________________ "Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Mar 09, 2009 4:07 am Post subject: |
[quote] |
|
Captain Vimes wrote: | Check the project files for what? And what exactly is a working directory?
I feel like such a noob. |
I boxed in blue the spot that you need to set to your working directory.
A working directory is the folder that your game executable "lives" in.
If your exe is in C:\Game\
and your graphics are in C:\Game\Data\Graphics
your working directory should be C:\Game\
and your code should look in
Data\Graphics\ for your images.
Make sense yet? _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Captain Vimes Grumble Teddy
Joined: 12 May 2006 Posts: 225 Location: The City Streets
|
Posted: Mon Mar 09, 2009 5:23 pm Post subject: |
[quote] |
|
I think I found it, but the graphics still aren't rendering. I can't see your picture to make sure, though.
I went to Project->Properties->Build Targets and changed the "Execution Working Directory" box to the appropriate folder. The image files are in the folder "img" and here's the function call:
SDL_LoadBMP("img/background.bmp")
Is this right?
I'm going to keep messing around with the Sprite class code just in case I screwed something up. Updates in a minute. _________________ "Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Mar 09, 2009 10:46 pm Post subject: |
[quote] |
|
Captain Vimes wrote: | I think I found it, but the graphics still aren't rendering. I can't see your picture to make sure, though.
I went to Project->Properties->Build Targets and changed the "Execution Working Directory" box to the appropriate folder. The image files are in the folder "img" and here's the function call:
SDL_LoadBMP("img/background.bmp")
Is this right?
I'm going to keep messing around with the Sprite class code just in case I screwed something up. Updates in a minute. |
looks right... why can't you see the image I posted??? _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Captain Vimes Grumble Teddy
Joined: 12 May 2006 Posts: 225 Location: The City Streets
|
Posted: Tue Mar 10, 2009 6:01 pm Post subject: |
[quote] |
|
School blocks your site and everything from it. That's why I haven't posted on NOGDUS - my proxy doesn't work any more.
Anyway, still not working, so I think I must have screwed something up. Still digging... _________________ "Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Wed Mar 11, 2009 1:32 am Post subject: |
[quote] |
|
Captain Vimes wrote: | School blocks your site and everything from it. That's why I haven't posted on NOGDUS - my proxy doesn't work any more.
Anyway, still not working, so I think I must have screwed something up. Still digging... |
WTF!
It blocks my site but not rpgdx? thats fucked up! _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Captain Vimes Grumble Teddy
Joined: 12 May 2006 Posts: 225 Location: The City Streets
|
Posted: Wed Mar 11, 2009 5:28 pm Post subject: |
[quote] |
|
Any site that has downloadable content, games, or is even mildly interesting they block. They also have a set few keywords that they look for in site descriptions - I think some part of NOGDUS' signature must have set off the block, because as far as I know I'm the only person that uses it.
The block isn't infallible, though - that's why I can access sites like RPGDX and KingdomRPG from the computer lab. Any site that's been Google Cached, you can access the cache version. And aside from the basic blocks - MySpace, YouTube, etc. - they only block sites that people access from the library and they deem "inappropriate" (i.e. anything you access while they're nearby). But since I never get on RPGDX or my other sites from the library, they don't know that they exist and therefore don't block them.
And yes, the blocking system is screwed up. They have blocked, so far,
- a search engine (SiteFindService)
- several research-critical sites such as Yahoo! News
- THEIR OWN WEB SITE _________________ "Sometimes it is better to light a flamethrower than to curse the darkness."
- Terry Pratchett
|
|
Back to top |
|
|