Author Topic: code compliation not working properly  (Read 3877 times)

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
code compliation not working properly
« on: January 26, 2011, 02:23:29 pm »
I am a newbie in codeblocks (and also newbie in programming  :? ).

when i type something in codeblocks like "in" it show all related result starting from "in" like int, inline, intmax_t, int16_t etc.

but when i type something related from windows library it does not shows anything, like when i type "Get" it should show "GetAsyncKeyStates" or something like that which is related to windows.h.

i am having same problem with every library.

i am using codeblocks 10.5 (windows 7).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: code compliation not working properly
« Reply #1 on: January 26, 2011, 02:39:39 pm »
Update to one of the latest nightlies.
The problem should be fixed there or C::B's CC should highly improved (there are problems with hairy marco expansions and templates).
(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!]

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: code compliation not working properly
« Reply #2 on: January 26, 2011, 03:47:58 pm »
Update to one of the latest nightlies.
The problem should be fixed there or C::B's CC should highly improved (there are problems with hairy marco expansions and templates).


now i am using the latest nightly builds.

things are now a bit improved but still not bug free.
when i chose to work with a .c file the code completion works properly but when i chose to work with .cpp files i am getting the same problem again.

am i doing something wrong or its a bug in codeblocks.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: code compliation not working properly
« Reply #3 on: January 28, 2011, 08:21:41 am »
Update to one of the latest nightlies.
The problem should be fixed there or C::B's CC should highly improved (there are problems with hairy marco expansions and templates).


now i am using the latest nightly builds.

things are now a bit improved but still not bug free.
when i chose to work with a .c file the code completion works properly but when i chose to work with .cpp files i am getting the same problem again.

am i doing something wrong or its a bug in codeblocks.
would you post the steps to produce this bug and show how your code sample?
So that, we can help you and fix these kind of bug.

ollydbg
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: code compliation not working properly
« Reply #4 on: January 30, 2011, 11:28:43 am »
the codeblocks is not showing any library functions of any .cpp project till i close the project and reopen it again

Code: [Select]
#include<iostream>
#include<conio.h>
#include<time.h>

using namespace std;

int main()

{
    time_t rawtime;
    struct tm * timeinfo;
    time(&rawtime);
    timeinfo = localtime(&rawtime);
    cout<<asctime(timeinfo);
    getch();
    return 0;

}

when i type this code its showing function time_t, return, struct but its not showing any functions related to time.h library.

and when close and reopen the same file again every thing is working fine. it shows all the time.h and other library functions properly.

i think its a bug and i hope it will get fixed soon.
if anyone knows how can i fix this then please let me know.

(i am using Code::blocks SVN 6931 nightly builds)

off topic question -- does anyone know how to setup codeblocks to work with pspsdk.
my pspsdk is properly working. just need to attach it with codeblocks and compile the program.


 

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: code compliation not working properly
« Reply #5 on: January 30, 2011, 01:58:27 pm »
the codeblocks is not showing any library functions of any .cpp project till i close the project and reopen it again

Code: [Select]
#include<iostream>
#include<conio.h>
#include<time.h>

using namespace std;

int main()

{
    time_t rawtime;
    struct tm * timeinfo;
    time(&rawtime);
    timeinfo = localtime(&rawtime);
    cout<<asctime(timeinfo);
    getch();
    return 0;

}

when i type this code its showing function time_t, return, struct but its not showing any functions related to time.h library.

and when close and reopen the same file again every thing is working fine. it shows all the time.h and other library functions properly.

i think its a bug and i hope it will get fixed soon.
if anyone knows how can i fix this then please let me know.


thanks, I can confirm this. It was definitely a bug. It seems even the file is saved, the new #included "header" file was not parsed.

Quote
off topic question -- does anyone know how to setup codeblocks to work with pspsdk.
my pspsdk is properly working. just need to attach it with codeblocks and compile the program.
what does this means?? I don't get your idea...
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.