Hello, I found a bug. In C files, in presence of the directive 'extern "C" {' Symbol window stop to show symbols, no function no variables after that, just show that is declared before. I noticed that if comment this line start working again. I would like to try to fix it escaping '{' in case of be part of 'extern "C" {' if the community consider it a proper way to fix.
`extern "C" {...}` is C++ not C, so it should not be in a C file. It is correctly parsed in C++ files.
Yes, you are fully right. But I am working in my job for a project fully writen in C that, for some platform we use a C compiler but other platforms are using C++ compiler, and for keep the portability we use 'extern "C" {'. I still thinking that escape that '{' in this case for the C parser will not break any functionality and will make the life of some programmers easyer... What is your oppinion? @elextr
So always edit your code as C++?
What version of Geany are you using? It works for me with current git.
I am using the last release, 1.37.1 Win32. I attach two captures that describes better the isue ![externC](https://user-images.githubusercontent.com/6671137/115714671-0fbb3300-a380-11...) ![noExternC](https://user-images.githubusercontent.com/6671137/115714696-1649aa80-a380-11...)
@elextr I just compiled from the git repo in Win32, I got the same issue as you can see in the captures
Please post a _short_ piece of C code that fails.
@elextr This is a small example, commenting and uncommenting the 'extern "C" {' you can see how appears and disappears symbols: `#ifdef LLECOM_WIFI_DEBUG #include <stdio.h> #define LLECOM_WIFI_DEBUG_TRACE printf("[DEBUG] ");printf #else #define LLECOM_WIFI_DEBUG_TRACE(...) ((void) 0) #endif
#ifdef __cplusplus extern "C" { #endif
void LLECOM_WIFI_init(void) {
WIFI_RTL8722DM_initialize_f(); }
void LLECOM_WIFI_IMPL_enableSoftAP_action(MICROEJ_ASYNC_WORKER_job_t* job) {
}
#ifdef __cplusplus } #endif
`
Pasted your above into new document, saved to `/tmp/untitled.c`
Functions "LLECOM_WIFI_init" and "LLECOM_WIFI_IMPL_enableSoftAP_action" both show in symbols for me
Ahh, can't help with windows bugs, somebody else???
Not sure why it didn't work with 1.37 on Windows but on Linux.
But now it works with current GIT master: ![geany_windows_c_symbols_issue2793](https://user-images.githubusercontent.com/617017/132990246-791a768b-24a8-400...)
@zipotron if you are curious, you can try: https://download.geany.org/snapshots/geany-1.38beta1_setup.exe https://download.geany.org/snapshots/geany-plugins-1.38beta1_setup.exe
But please note that these are unofficial builds from GIT master (with switch to GTK3 and 64bit).
Closed #2793.
github-comments@lists.geany.org