Recent Posts

Pages: 1 [2] 3 4 5 6 7 ... 10
11
I am new, I am here

For real :)
12
Using Code::Blocks / Project files on other drive dont work
« Last post by dkaip on Yesterday at 08:47:56 am »
Hello.
My project is on Linux.
With VirtualBox running C::B on Windows10, project files are in F:\ folder.
But C::B it can not see files, even if import all files.
There is a way to fix it?
Thank you.
Jim
13
Help / Set variable: LD_LIBRARY_PATH=.:
« Last post by slaterbbx on Yesterday at 08:45:11 am »
Cannot seem to find out what the issue is, just a simple hello world app that works fine everywhere else.

GCC is installed and I am using Linux distro "Solus mate" v4. Installed via eopkg pkg manager and works fine other than this error when trying to run an exe compiled in codeblocks. Image for ref attached.

When I first installed codeblocks, it said that 1 of 3 "_blank" would need linked later after installation but I didn't take note of it, thus I think this is related to the compiler but am unsure since it will compile the project, just not playback and the exe files will not open.

I googled for a while, found that one issue could be related to xterm being used by default to launch into, I changed that to mate-terminal to be procise to solus mate, no joy though.

Any help greatly appreciated.

Thanks,
Kyle
14
IMHO the better option would be disabling the option if there are no selected files, but a message is easier and the user is expecting a popup anyway.
15
Using Code::Blocks / Remove files silently fails when no file has been selected.
« Last post by Pecan on September 23, 2021, 07:53:11 pm »
Remove files silently fails when no file has been selected just after a project is loaded.

1) load a project
2) click main menu/Project/Remove files...

Nothing happens.
Shouldn't the user be given a message to select a file first?
Code
Name                    : Code::Blocks
Version                 : svn-r12516
SDK Version             : 2.14.0
Scintilla Version       : 3.7.5
Author                  : The Code::Blocks Team
E-mail                  : [email protected]
Website                 : http://www.codeblocks.org
OS                      : Windows 10 (build 18363), 64-bit edition
Scaling factor          : 1.000000
Detected scaling factor : 1.000000
Display PPI             : 120x120
Display count           : 1
Display 0 (\\.\DISPLAY1): XY=[0,0]; Size=[1920,1080]; Primary

wxWidgets Library (wxMSW port)
Version 3.1.5 (Unicode: wchar_t, debug level: 1),
compiled at Jun  5 2021 11:08:36

Runtime version of toolkit used is 10.0.
16
Help / Re: C/C++ Parser issue [Solved/Workaround]
« Last post by mburge on September 23, 2021, 07:26:53 pm »
Quote
Now the Editor correctly parses the preprocessor directives and greys out the second directive

Currently, the Editor's syntax highlight is not related to the CodeCompletion plugin.

You mentioned code is inside the CodeCompletion plugin, but the editor highlight is related to Scintilla control.

Yes, I were pointing out that visually things were correct, but functionally not.

The workaround simply makes the parser treat the LLVM compiler as it would the GCC compiler, i.e.,
it triggers the AddCompilerPredefinedMacrosGCC code path which is to retrieve the compiler's predefined macros by
invoking it with  " -E -dM -x c++ %s nul"
(Caveat : this only works with the LLVM compiler as it responds the same to the parameters as GCC would.)

Having the predefined macros solves 1)having the incorrect info in tooltips and 2)Find declaration misleading you to an inactive declaration.


One last thing - on the Editor side (Scintilla) doesn't take into account that when working with LLVM on Windows it has _MSC_EXTENSIONS defined by default
which results in visually having large sections of code grey'd out (#if defined(_MSC_EXTENSIONS) ... #endif) but that's small beans as
CodeCompetion still parses it correctly and has the right information in tooltips and Find declaration points to the right places.


Regards
17
Help / Re: C/C++ Parser issue [Solved/Workaround]
« Last post by ollydbg on September 23, 2021, 04:11:44 pm »
Quote
Now the Editor correctly parses the preprocessor directives and greys out the second directive

Currently, the Editor's syntax highlight is not related to the CodeCompletion plugin.

You mentioned code is inside the CodeCompletion plugin, but the editor highlight is related to Scintilla control.
18
Help / Re: openGL, SFML setup
« Last post by Miguel Gimenez on September 23, 2021, 01:33:22 pm »
Install a nightly and a recent compiler, then use the project wizard to create a basic OpenGL project and later modify that project using the examples.
19
Help / C/C++ Parser issue [Solved/Workaround]
« Last post by mburge on September 23, 2021, 05:03:45 am »
Workaround:
Go to Settings->Compiler
Select your project's LLVM compiler
Rename Copy it and make sure it has  "GCC" in the new name!

Why:
Hard coded values in the parser

Where:
https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/codecompletion/nativeparser.cpp

bool NativeParser::AddCompilerPredefinedMacros(cbProject* project, ParserBase* parser)
...
    // gcc
    if (compilerId.Contains(_T("gcc")))
    {
        if ( !AddCompilerPredefinedMacrosGCC(compilerId, project, defs, parser) )
            return false;
    }
    // vc
    else if (compilerId.StartsWith(_T("msvc")))
    {
        if ( !AddCompilerPredefinedMacrosVC(compilerId, defs, parser) )
          return false;
    }
...
}

Quote
Hi all!

issue w/ the c/c++ parser when evaluating if defined(__cplusplus) when parsing a .h file in a C++ project?

some info
have a C++ Project
have a header file (.h) with many instances of:
Code
#if defined(__cplusplus)
#define MACRO thing
#else
#define MACRO other_thing
#endif

Now the Editor correctly parses the preprocessor directives and greys out the second directive, i.e., #define MACRO other_thing ..
But!
..internally things aren't so:
1) on use, when one hovers over the macro the tooltip content is "#define MACRO other_thing" !
2) in code, select macro, right click, choose "Find declaration of: 'MACRO'" will land you at the second directive .

Does not affect compiler and/or resulting code but does a number on my mind :'(

Windows 10 64bit
Code::Blocks svn12452
LLVM Clang

I have everything enabled in
General Settings -> C/C++ Editor settings
and
Code Completion -> C/C++ parser

pls help  :(
20
Help / openGL, SFML setup
« Last post by Holy_Bible_Servant on September 23, 2021, 02:19:40 am »
I am new and im here . . . im having such a problem getting open GL

https://www.opengl.org/archives/resources/code/samples/glut_examples/examples/examples.html

to work on my x64/windows 8.1 computer to work.  ive done many tuts on youtube to try to get open GL files to work correctly but no success.  I am looking to get into 3D game programming and i already know how to model 3D with autodesk maya.  can anyone shoot me some links to where I can get openGL/freeGLUT to work correctly?

specs: windows 8.1 x64, tdm-GCC compiler install,
Pages: 1 [2] 3 4 5 6 7 ... 10