July 1, 2009 by Christian
Using separate build libraries lead to the following message of the Visual Studio 2008 linker:
warning LNK4099: PDB 'vc90.pdb' was not found with ...
The problem is that the object files embeds the path to the PDB file. The following steps extracts the object file from the library and shows the embedded path.
C:\>lib /list al.lib
Microsoft (R) Library Manager Version 9.00.30729.01
...
.\Debug\alIP_Winsock.obj
...
C:\>lib /extract:.\Debug\alIP_Winsock.obj al.lib
Microsoft (R) Library Manager Version 9.00.30729.01
C:\>dir *.obj
...
30.06.2009 13:53 48.195 alIP_Winsock.obj
...
C:\>dumpbin /section:.debug$T /rawdata alIP_Winsock.obj
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
...
Dump of file alIP_Winsock.obj
...
RAW DATA #3E
00000000: 04 00 00 00 6E 00 15 15 D1 E3 36 F9 6E D3 E4 4E ....n...Ñã6ùnÓäN
00000010: 92 D2 08 70 C2 43 72 F6 01 00 00 00 63 3A 5C 5F .Ò.pÂCrö....c:\_
...
00000030: 6F 61 5C 63 6F 64 65 5C 64 70 77 73 63 6F 72 65 oa\code\dpwscore
00000040: 2D 32 2E 31 2E 30 5C 70 6C 61 74 66 6F 72 6D 5C -2.1.0\platform\
00000050: 76 73 32 30 30 38 5C 77 69 6E 33 32 5C 61 6C 5C vs2008\win32\al\
00000060: 61 6C 5C 64 65 62 75 67 5C 76 63 39 30 2E 70 64 al\debug\vc90.pd
00000070: 62 00 F2 F1 b.òñ
...
Fixing this problem is done by setting the Program Database File for the object file and the library to the same setting.
Here are the location in the VS2008 Project Properties:
Project Configuration Properties -> C/C++ -> Output Files
Program Database File
This name, e.g. $(IntDir)\vc90.pdb, is embedded into the object file and it should be the same as the one in
Project Configuration Properties -> Linker -> Debugging
Generate Program Database File
This is, e.g. $(TargetDir)$(TargetName).pdb
Now the object file contain the path where the library is located, too.
...
RAW DATA #3E
00000000: 04 00 00 00 56 00 15 15 3E 7B 32 F1 12 86 51 48 ....V...>{2ñ..QH
00000010: 97 34 6B AC 14 85 20 C2 01 00 00 00 63 3A 5C 5F .4k¬.. Â....c:\_
...
00000030: 6F 61 5C 63 6F 64 65 5C 74 6F 6F 6C 73 5C 64 70 oa\code\tools\dp
00000040: 77 73 63 6F 72 65 62 75 69 6C 64 5C 64 65 62 75 wscorebuild\debu
00000050: 67 5C 61 6C 2E 70 64 62 00 F3 F2 F1 g\al.pdb.óòñ
...
Here are the Properties as used within a VS C++ Project file (.vcproj) or Property file (.vsprops):
Tags: vs2008
Posted in Porting | Leave a Comment »
August 28, 2008 by Christian
Using the import statement of Python to load a self build module sometimes fails. In my personal experience most of the time the problem was due to unresolved symbols in my .so modules. For QNX and many other POSIX compatible systems like GNU/Linux Python uses dlopen to load the dynamic libraries aka modules.
Read the rest of this entry »
Tags: dll, dlopen, dynamic library, import, ld, linker, module, so
Posted in Python, QNX | 1 Comment »
August 28, 2008 by Christian
While programming in Python I use most of the time the Python perspective provided by the PyDev plug in for Eclipse. PyDev is the abbreviation of Python Development Environment and available from http://pydev.sourceforge.net/index.html. This post outlines the steps installing PyDev and the Python lint pylint.
Read the rest of this entry »
Tags: Eclipse, lint, perspective, PyDev, pylint
Posted in Python | Leave a Comment »
August 28, 2008 by Christian
In case you get only this information in the view of Eclipse or Momentics IDE named Debug:
Thread[0] 1 <symbol is not available>
The corresponding source is displayed as:
No source available for “”
[View Disassembly ...]
The launch of the target is terminated by a time out.
Read the rest of this entry »
Tags: debugging, Eclipse, gdb, IDE, Momentics, qconn
Posted in Python, QNX | Leave a Comment »
August 14, 2008 by Christian
Using TFPT from Microsoft Team Foundation PowerTools December 2006 with this or a similar command
> TFPT.exe /online
fails with the message
Unable to determine the workspace.
If this is the case for a workspace created with Visual Studio 2008 try to change the workspace from Visual Studio 2005. Even only changing the comment was sufficient in my case. After this change everything works again from TPFT and VS 2008, too.
Tags: TFPT, TFVC, VS2005, vs2008, workspace
Posted in Tools | Leave a Comment »
August 14, 2008 by Christian
A useful extension to Eclipse and therefore QNX Momentics is Mylyn (http://www.eclipse.org/mylyn/). It helps to organize your actual task in the perfect way. Give it a try!
To install it add for IDE 4.5 (Tau) the Eclipse 3.3 update site to Help->Software Updates->Find and install… . Select the radio button named “Search for new features to install” and click Next. Then it is possible to add a “New Remote Site…”.
For most distributions of Eclipse, there should already be a “Europa Discovery Site” defined in the Update Manager. Otherwise you can add the following URL as a remote update site in the update manager.
http://download.eclipse.org/releases/europa/
See Eclipse Help for general information about using Update Manager.
To get the latest version of Mylyn you may add the Mylyn update site, too. This is the necessary URL:
http://download.eclipse.org/tools/mylyn/update/e3.3
Next important extension is PyDev (http://pydev.sourceforge.net). This is the URL for the remote update site:
http://pydev.sourceforge.net/updates/
Tags: PyDev, Mylyn, Eclipse, Momentics, task oriented development
Posted in QNX | Leave a Comment »
August 14, 2008 by Christian
Tags: bmake, build, make, pkgsrc, QNX, target
Posted in Python | Leave a Comment »
August 14, 2008 by Christian
To have access on files using FTP, HTTP and directly from file system I use the free library libcurl. Another important aspect is portability as the application should work on QNX using qcc/gcc 4.2.3 and on Windows using VC9/VS2008. So I give libcurl a try. The build process for libcURL is as stated in the documentation very straight forward. But there where two little pitfalls discovered when using VS2008.
Read the rest of this entry »
Tags: curl, gcc, libcurl, QCC, QNX, vc9, vs2008
Posted in QNX, Tools | Leave a Comment »
July 9, 2008 by Christian
While running a script it fails immediately with “No such file or directory“. Even a print or echo command in the second line of the script is ignored. The used program to process the script does exist and is running, too. In this case checking the line endings may help:
file nameofthescript
will report:
ISO-8859 English text, with CRLF line terminators
but expected is:
ISO-8859 English text
The problem are the CR/LF line endings. These are typically used from MS Windows applications. Correct the line endings using any editor. For MS Windows try the Notepad++ open source editor. It has a build-in menu item to fix the line endings: Format -> Convert to Unix.
Tags: Bash, Linux, Python, QNX, Script, Shell, Unix
Posted in QNX | Leave a Comment »
July 3, 2008 by Christian
Tags: gcc 4.2, Java6, QDE, Tau
Posted in QNX | Leave a Comment »