Author Topic: svn 7121 doesn't properly load a file when the linker encounters an error  (Read 9005 times)

Offline ouch

  • Almost regular
  • **
  • Posts: 223
so yeah, if there is an error that causes the linker to go to a source file at some line number, the file will be loaded blank... you can work around this by opening the file in the editor first and then rebuilding, then everything seems to work.
« Last Edit: April 22, 2011, 12:07:52 am by ouch »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Can you attach a file where this happens and post your encoding settings ("Settings -> Editor -> General settings -> Other settings").
What is your system locale.
And of course which OS do you use ?

Offline ouch

  • Almost regular
  • **
  • Posts: 223
The file is attached.

encoding is WINDOWS-1252

Local is English (United States)

OS is: Windows 7 64 bit

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Is it the compiler or the linker who complains?
I think I have seen this behavior, but with linker errors.

Offline ouch

  • Almost regular
  • **
  • Posts: 223
You made me go back and think about that...

heh, I recreated my error and it was indeed a linker error not a compiler one. My mistake.

But it still shouldn't do that...

here is the build log if it helps.

Code
-------------- Clean: Debug in Generic project name ---------------

Cleaned "Generic project name - Debug"

-------------- Build: Debug in Generic project name ---------------

mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0  -g    -IC:\wxwidgets\WX_2_9_0_BRANCH\include -IC:\wxwidgets\WX_2_9_0_BRANCH\contrib\include -I"..\Generic project name" -IC:\wxwidgets\WX_2_9_0_BRANCH\lib\gcc_dll\mswu -I..\..\..\..\..\wxwidgets\wxsqlite3\include -I..\..\..\..\..\wxwidgets\wxsqlite3\sqlite3\sqlite-amalgamation-3070602 -I..\..\..\..\..\libcsv-3.0.0  -c "C:\Users\censored\Desktop\censored-Code\Generic project name\wx_pch.h" -o wx_pch.h.gch
windres.exe -i C:\Users\censored\Desktop\sensor~1\genere~1\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\wxwidgets\WX_2_9_0_BRANCH\include -IC:\wxwidgets\WX_2_9_0_BRANCH\lib\gcc_dll\mswu
mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0  -g    -IC:\wxwidgets\WX_2_9_0_BRANCH\include -IC:\wxwidgets\WX_2_9_0_BRANCH\contrib\include -I"..\Generic project name" -IC:\wxwidgets\WX_2_9_0_BRANCH\lib\gcc_dll\mswu -I..\..\..\..\..\wxwidgets\wxsqlite3\include -I..\..\..\..\..\wxwidgets\wxsqlite3\sqlite3\sqlite-amalgamation-3070602 -I..\..\..\..\..\libcsv-3.0.0  -c "C:\Users\censored\Desktop\censored-Code\Generic project name\Generic_project_nameMain.cpp" -o obj\Debug\Generic_project_nameMain.o
mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0  -g    -IC:\wxwidgets\WX_2_9_0_BRANCH\include -IC:\wxwidgets\WX_2_9_0_BRANCH\contrib\include -I"..\Generic project name" -IC:\wxwidgets\WX_2_9_0_BRANCH\lib\gcc_dll\mswu -I..\..\..\..\..\wxwidgets\wxsqlite3\include -I..\..\..\..\..\wxwidgets\wxsqlite3\sqlite3\sqlite-amalgamation-3070602 -I..\..\..\..\..\libcsv-3.0.0  -c C:\wxwidgets\wxsqlite3\src\wxsqlite3.cpp -o obj\Debug\wxwidgets\wxsqlite3\src\wxsqlite3.o
mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0  -g    -IC:\wxwidgets\WX_2_9_0_BRANCH\include -IC:\wxwidgets\WX_2_9_0_BRANCH\contrib\include -I"..\Generic project name" -IC:\wxwidgets\WX_2_9_0_BRANCH\lib\gcc_dll\mswu -I..\..\..\..\..\wxwidgets\wxsqlite3\include -I..\..\..\..\..\wxwidgets\wxsqlite3\sqlite3\sqlite-amalgamation-3070602 -I..\..\..\..\..\libcsv-3.0.0  -c "C:\Users\censored\Desktop\censored-Code\Generic project name\Generic_project_nameApp.cpp" -o obj\Debug\Generic_project_nameApp.o
mingw32-g++.exe -LC:\wxwidgets\WX_2_9_0_BRANCH\lib\gcc_dll\ -L..\..\..\..\..\wxwidgets\wxsqlite3\lib\gcc_lib\ -L..\..\..\..\..\wxwidgets\wxsqlite3\sqlite3\SQLite3 -L..\..\..\..\..\libcsv-3.0.0\LibCSV  -o "bin\Debug\Generic project name.exe" obj\Debug\Generic_project_nameMain.o obj\Debug\wxwidgets\wxsqlite3\src\wxsqlite3.o obj\Debug\Generic_project_nameApp.o  obj\Debug\resource.res  -mthreads  -lwxmsw29u -lSQLite3 -lLibCSV  -mwindows
obj\Debug\wxwidgets\wxsqlite3\src\wxsqlite3.o:C:/wxwidgets/wxsqlite3/src/wxsqlite3.cpp:2986: undefined reference to `sqlite3_wal_checkpoint_v2'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 7 seconds)
1 errors, 0 warnings (0 minutes, 7 seconds)

oh, and I'm using TDM Mingw 4.5.2
« Last Edit: April 22, 2011, 12:06:22 am by ouch »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Can you start C::B from command-line with the -d parameter and post the output of the debug-log when C::B tries to open the file.
Should be something like:
Code
Text seems to be pure ASCII!
We use user specified encoding: Unicode 8 bit (UTF-8) (ID: 41)
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
I use UTF-8 as default (and system encoding).

Offline ouch

  • Almost regular
  • **
  • Posts: 223
here is the relevant log stuff from this command:

codeblocks.exe wxsqlite3.cpp /d

Code
Opening file C:\codeblocks\src\output\wxsqlite3.cpp
Text seems to be pure ASCII!
We use user specified encoding: Windows Western European (CP 1252) (ID: 33)
Final encoding detected: Windows Western European (CP 1252) (ID: 33)
Editor Open

and the file opened and displayed fine.

when compiling my project with the linker error I get this:
Code
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading toolbar...
Abbreviations: loaded
AStylePlugin: loaded
Autosave: loaded
AutoVersioning: loaded
BrowseTracker: loaded
BYOGames: loaded
CB_Koders: loaded
Cccc: loaded
ClassWizard: loaded
CodeCompletion: loaded
CodeSnippets: loaded
CodeStat: loaded
Compiler: loaded
copystrings: loaded
CppCheck: loaded
Cscope: loaded
Debugger: loaded
FilesExtensionHandler: loaded
DevPakUpdater: loaded
DoxyBlocks: loaded
cbDragScroll: loaded
EditorTweaks: loaded
EnvVars: loaded
Exporter: loaded
FileManager: loaded
HeaderFixup: loaded
HelpPlugin: loaded
HexEditor: loaded
IncrementalSearch: loaded
cbKeyBinder: loaded
lib_finder: loaded
MouseSap: loaded
NassiShneidermanPlugin: loaded
OpenFilesList: loaded
Profiler: loaded
ProjectsImporter: loaded
RegExTestbed: loaded
ReopenEditor: loaded
ScriptedWizard: loaded
SymTab: loaded
ThreadSearch: loaded
ToDoList: loaded
ToolsPlus: loaded
wxSmith: loaded
wxSmithMime: loaded
wxSmithAui: loaded
wxSmithContribItems: loaded
WindowsXPLookNFeel: loaded
Abbreviations plugin activated
Source code formatter (AStyle) plugin activated
Autosave plugin activated
AutoVersioning plugin activated
BrowseTracker plugin activated
BYO Games plugin activated
Koders query plugin activated
Cccc plugin activated
Class wizard plugin activated
Code completion plugin activated
Code snippets plugin activated
Code statistics plugin activated
Added compiler "GNU GCC Compiler"
Added compiler "Microsoft Visual C++ Toolkit 2003"
Added compiler "Microsoft Visual C++ 2005/2008"
Added compiler "Microsoft Visual C++ 2010"
Added compiler "Borland C++ Compiler (5.5, 5.82)"
Added compiler "Digital Mars Compiler"
Added compiler "OpenWatcom (W32) Compiler"
Added compiler "GNU GCC Compiler for MSP430"
Added compiler "Cygwin GCC"
Added compiler "LCC Compiler"
Added compiler "Intel C/C++ Compiler"
Added compiler "SDCC Compiler"
Added compiler "Tiny C Compiler"
Added compiler "GDC D Compiler"
Added compiler "LLVM D Compiler"
Added compiler "Digital Mars D Compiler"
Added compiler "GNU ARM GCC Compiler"
Added compiler "GNU AVR GCC Compiler"
Added compiler "GNU GCC Compiler for PowerPC"
Added compiler "GNU GCC Compiler for TriCore"
Compiler plugin activated
Copy Strings to clipboard plugin activated
CppCheck plugin activated
Cscope plugin activated
Debugger plugin activated
Files extension handler plugin activated
DevPak updater/installer plugin activated
DoxyBlocks plugin activated
DragScroll plugin activated
Editor Tweaks plugin: Building menu
Editor Tweaks plugin: making the menu 14
EditorTweaks plugin activated
Environment variables plugin activated
Source Exporter plugin activated
FileManager plugin activated
Header Fixup plugin activated
Help plugin plugin activated
HexEditor plugin activated
IncrementalSearch plugin activated
Keyboard shortcuts plugin activated
Library finder plugin activated
MouseSap plugin activated
NassiShneidermanPlugin plugin activated
Open files list plugin activated
Code profiler plugin activated
Foreign projects importer plugin activated
Regular expressions testbed plugin activated
ReopenEditor plugin activated
Project wizard added for 'Empty project'
Project wizard added for 'Fortran application'
Project wizard added for 'Fortran library'
Project wizard added for 'Fortran DLL'
Project wizard added for 'Console application'
Project wizard added for 'D application'
Project wizard added for 'Direct/X project'
Project wizard added for 'Dynamic Link Library'
Project wizard added for 'Kernel Mode Driver'
Project wizard added for 'FLTK project'
Project wizard added for 'GLFW project'
Project wizard added for 'GLUT project'
Project wizard added for 'GTK+ project'
Project wizard added for 'Irrlicht project'
Project wizard added for 'Lightfeather project'
Project wizard added for 'Matlab project'
Project wizard added for 'OpenGL project'
Project wizard added for 'Ogre project'
Project wizard added for 'Code::Blocks plugin'
Project wizard added for 'QT4 project'
Project wizard added for 'SDL project'
Project wizard added for 'SFML project'
Project wizard added for 'SmartWin project'
Project wizard added for 'Static library'
Project wizard added for 'STL port application'
Project wizard added for 'Shared library'
Project wizard added for 'Win32 GUI project'
Project wizard added for 'wxWidgets project'
Build-target wizard added for 'Console'
Build-target wizard added for 'Static library'
Build-target wizard added for 'Dynamic Link Library'
Build-target wizard added for 'wxWidgets'
Project wizard added for 'ARM Project'
Project wizard added for 'AVR Project'
Project wizard added for 'TriCore Project'
Project wizard added for 'PowerPC Project'
File(s) wizard added for 'Empty file'
File(s) wizard added for 'C/C++ source'
File(s) wizard added for 'C/C++ header'
File(s) wizard added for 'Fortran source'
Scripted wizard plugin activated
Symbol Table Plugin plugin activated
ThreadSearch plugin activated
Todo List plugin activated
ToolsPlus plugin activated
wxSmith plugin activated
wxSmith - MIME plugin plugin activated
wxSmith - Aui plugin activated
wxSmith - Contrib Items plugin activated
Windows XP Look'n'Feel plugin activated
Initializing plugins...
Loading project file...
Parsing project file...
Loading target Debug
Loading target Release
Loading project files...
16 files loaded
Done loading project in 11ms
Project's base path: C:\Users\censored\Desktop\censored-Code\Generic project name\
Project's common toplevel path: C:\
Text seems to be pure ASCII!
We use user specified encoding: Windows Western European (CP 1252) (ID: 33)
Final encoding detected: Windows Western European (CP 1252) (ID: 33)
Editor Open
project data set for C:\Users\censored\Desktop\censored-Code\Generic project name\Generic_project_nameMain.cpp
Top Editor: C:\Users\censored\Desktop\censored-Code\Generic project name\Generic_project_nameMain.cpp
Caching GCC dir: C:\tdm-mingw32\lib\gcc\mingw32\4.5.2\include\c++
Caching GCC dir: C:\tdm-mingw32\lib\gcc\mingw32\4.5.2\include\c++\mingw32
Caching GCC dir: C:\tdm-mingw32\lib\gcc\mingw32\4.5.2\include\c++\backward
Caching GCC dir: C:\tdm-mingw32\include
Caching GCC dir: C:\tdm-mingw32\lib\gcc\mingw32\4.5.2\include
Caching GCC dir: C:\tdm-mingw32\lib\gcc\mingw32\4.5.2\include-fixed
Passing list of files to batch-parser.
Header to parse up-front: 'C:\tdm-mingw32\lib\gcc\mingw32\4.5.2\include\c++\cstddef'
Header to parse up-front: 'C:\tdm-mingw32\include\w32api.h'
Header to parse up-front: 'C:\wxwidgets\WX_2_9_0_BRANCH\include\wx\defs.h'
Header to parse up-front: 'C:\wxwidgets\WX_2_9_0_BRANCH\include\wx\dlimpexp.h'
Header to parse up-front: 'C:\wxwidgets\WX_2_9_0_BRANCH\include\wx\toplevel.h'
Add up-front parsing 5 file(s) for project 'Generic project name'...
Add batch-parsing 12 file(s) for project 'Generic project name'...
Create new parser for project 'Generic project name'
Starting batch parsing for project 'Generic project name'...
Project 'Generic project name' parsing stage done (356 total parsed files, 55859 tokens in 0 minute(s), 2.643 seconds).
Updating class browser...
Class browser updated.
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Editor Open

But I have to go home now as the workday is done. But i'll check this post when I get home. But I won't be able to reproduce the problem with this project there.
« Last Edit: April 22, 2011, 01:08:43 am by ouch »

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Did you find anything? I just had it happen again today.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Did you find anything? I just had it happen again today.

Sorry for the late reply, I haven't been at home the last days (not holiday, work  :( ).

Nothing ath the moment, but I did not have much time to look into it.
And I did not try it on win7 only on linux.

I will try it on win7 64-bit as soon as possible.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
I guess I found the cause for this issue, and it should be fixed in trunk now (svn r7215).