Lnk1207 как исправить

  • Remove From My Forums
  • Question

  • Hi !

    I have installed VS 2012 , but i have VS 2010 also. After I open  VS 2010 projects with VS 2012 and  click «update», but while i debug it ,there is a error message:

    LINK : fatal error LNK1207: incompatible PDB format in ‘C:UsersAdmirDocumentsVisual Studio 2010Projectsnr.fjaleve.whileDebugnr.fjaleve.while.pdb’; delete and rebuild.

    What can I do to solve this?


    verify

Answers

  • Hi verify,

    It seems that it is not the VS debug issue.

    LINK : fatal error LNK1207: incompatible PDB format in ‘C:UsersAdmirDocumentsVisual Studio 2010Projectsnr.fjaleve.whileDebugnr.fjaleve.while.pdb’; delete and rebuild.

    Please Clean and Rebuild your app under “Build” menu, check it again. If still no help, maybe you could delete it manually, and then rebuild it again. Hope it could help.

    Reference:

    Linker Tools Error LNK1207

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by

      Thursday, December 27, 2012 10:57 AM

Помогаю со студенческими работами здесь

Найти причины возникновения ошибок в коде и исправить эти ошибки
Уважаемые пользователи просьба помочь с одной проблемой,смысл в том что при создании записи она…

Найти причины возникновения ошибок в коде и исправить эти ошибки
Всем привет, я новичок. Решил попробовать создать простенький класс который выводит данные которые…

Найти причины возникновения ошибок в коде и исправить эти ошибки
Всем хай. Во-первых, vs не видит в мейне V и говорит, что она не инициализирована, но на идеоне оно…

Найти причины возникновения ошибок в коде и исправить эти ошибки
Уважаемые форумчане, тут вот изучал дружественные методы, классы и функции и наткнулся вот на токую…

Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:

2

Hello all,

Compilation with IVF v15.0 & v16.0 (ia32) using the following command fails.

ifort /debug testprog.f90

The following error message is produced:

LINK : fatal error LNK1207: incompatible PDB format in ‘c:Davidtesttestprog.pdb’; delete and rebuild.

It would appear that with debug enabled the following intermediate files are produced: testprog.pdb, testprog.ilk. Furthermore a file vc140.pdb is created. These are not produced when when debug is disabled.

(1) What is the purpose of these files?

(2) Are they required to run the executable? (It would appear from my experiments that they are not needed but a definitive view would be appreciated.)

(3) If these files are not needed is there a switch to automatically delete them once compilation / linking is complete?

(4) My experimentation suggests that if you compile first with, say ifort v11.1, and then with ifort v16.0 then the LNK1207 is produced. It is not clear why the linker is trying to access the previously created *.pdb file or why it is not automatically clobbered by the linker.

Note that testprog.f90 is the following minimal program:

PROGRAM TESTPROG
END PROGRAM TESTPROG

Many thanks,
David.

I’m just trying to follow the instructions here to get the Quickstart example working. I am on Windows 7 and trying to use MSVC. I have Python 2.7 installed.

What I have done:

  • Download boost_1_57_0.zip and extract to C:boost_1_57_0.
  • From command prompt in C:boost_1_57_0, run:

    bootstrap
    

    then:

    .b2
    

    as per the instructions under 5.1 here. After this I have a message saying «The Boost C++ Libraries were successfully built!».

  • Add C:boost_1_57_0 to my path. The instructions don’t say to do this, but since they want me to invoke bjam, and that’s where it lives, I assume I need to do this.
  • Modify C:boost_1_57_0libspythonexamplequickstartboost-build.jam so that the path is boost-build ../../../../tools/build/src ; and not boost-build ../../../../tools/build/v2 ;. This is as per the instructions here since the original path is wrong and if you don’t do this the bjam invocation fails.
  • CD into C:boost_1_57_0libspythonexamplequickstart and run:

    bjam toolset=msvc --verbose-test test
    

The output I get is firstly:

...patience...
...patience...
...found 1926 targets...
...updating 55 targets...
common.mkdir bin
common.mkdir bintest_ext.test
common.mkdir bintest_ext.testmsvc-12.0
common.mkdir bintest_ext.testmsvc-12.0debug
common.mkdir bintest_ext.testmsvc-12.0debugthreading-multi
common.mkdir binmsvc-12.0
common.mkdir binmsvc-12.0debug
common.mkdir binmsvc-12.0debugthreading-multi
compile-c-c++ binmsvc-12.0debugthreading-multiextending.obj
extending.cpp
c:python27includepymath.h(22) : warning C4273: 'round' : inconsistent dll linkage
    C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(516) : see previous definition of 'round'
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDExtgmath.h(190) : warning C4273: '_hypot' : inconsistent dll linkage

followed by a long list of other header file entries, each complaining about inconsistent dll linkage, and then at the end a bunch of errors, highlights of which include:

LINK : fatal error LNK1207: incompatible PDB format in 'C:boost_1_57_0libspythonexamplequickstartbinmsvc-12.0debugthreading-multiextending.pdb'; delete and rebuild

...failed msvc.link.dll binmsvc-12.0debugthreading-multiextending.pyd binmsvc-12.0debugthreading-multiextending.pdb...
...removing binmsvc-12.0debugthreading-multiextending.pdb

LINK : warning LNK4001: no object files specified; libraries used
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
bintest_embed.testmsvc-12.0debugthreading-multitest_embed.exe : fatal error LNK1120: 1 unresolved externals

...failed msvc.link bintest_embed.testmsvc-12.0debugthreading-multitest_embed.exe bintest_embed.testmsvc-12.0debugthreading-multitest_embed.pdb...
...removing bintest_embed.testmsvc-12.0debugthreading-multitest_embed.pdb
...skipped <pbintest_embed.testmsvc-12.0debugthreading-multi>test_embed.run for lack of <pbintest_embed.testmsvc-12.0debugthreading-multi>test_embed.exe...
...failed updating 4 targets...

Any ideas?

asked Mar 14, 2015 at 19:21

lemondifficult's user avatar

The problem is still present with 1.59. I’ve managed to get Boost.Build working again by editing the file:

D:boostboost_1_59_0toolsbuildsrctoolsmsvc.jam

I made two changes:

  1. Change this (lines #1351-1355):

         generators.register [ new msvc-linking-generator msvc.link.dll :
             OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
             <toolset>msvc <suppress-import-lib>false ] ;
         generators.register [ new msvc-linking-generator msvc.link.dll :
             OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB :
             <toolset>msvc <suppress-import-lib>true ] ;
    

    to:

        generators.register [ new msvc-linking-generator msvc.link.dll :
            OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
            <toolset>msvc ] ;
    
  2. Remove this line (#1472):

        toolset.flags msvc.link.dll LINKFLAGS <suppress-import-lib>true : /NOENTRY ;
    

I’ve tested this on Win7 with VS2012 and Python 2.7.

answered Nov 8, 2015 at 23:02

Ralph's user avatar

RalphRalph

5,1441 gold badge21 silver badges19 bronze badges

1

I also saw that incompatible PDB format issue, but only with 1.57, which (since the Boost.Python source is the same for 1.57 and 1.55 and I can get it working on 1.55) I’m guessing is somehow related to the changes in the boost::build path.

I’ve documented what I had to do to get it working with 1.55, maybe that will be some help.

answered Apr 10, 2015 at 17:54

teeks99's user avatar

teeks99teeks99

3,5542 gold badges30 silver badges38 bronze badges

2

Madness I tell you.

Anyway, I finally succeeded in building the quickstart example on boost_1_68_0.
A quick guidethrough:

  • (On windows, visual studio 2017 and SDK installed, python 3.5 installed)
  • Download and extract it in like C:boost_1_68_0
  • Run bootstrap.bat
  • Build the boost-python libraries:

C:boost_1_68_0>.b2 —with-python -j4

  • Go to C:boost_1_68_0libspythonexample, and fix the Jamroot to find your header files
    project
  : requirements
    <include>C:\boost_1_68_0
    <library>boost_python
  • Fix the toolsbuildsrctoolsmsvc.jam file in the way Ralph in this post commented
  • As described here , patch embedding.cpp and extending.cpp by adding «#define BOOST_PYTHON_STATIC_LIB» as the first line everywhere
  • Copy the built python-boost libs (from C:boost_1_68_0stagelib) to the quickstart folder
  • Finally build it

C:boost_1_68_0libspythonexamplequickstart>……..b2.exe -j4

Again, this is -crazy- complex. All the other stuff builds just fine, but the python linkage is really broken. Anyway, in case anyone tries, hope this helps.

answered Dec 10, 2018 at 14:02

Arnout's user avatar

ArnoutArnout

3412 silver badges8 bronze badges

Я просто пытаюсь следовать инструкциям здесь, чтобы получить пример Quickstart. Я нахожусь в Windows 7 и пытаюсь использовать MSVC. У меня установлен Python 2.7.

Что я наделал:

  • Загрузите boost_1_57_0.zip и извлеките C:boost_1_57_0.
  • Из командной строки в C:boost_1_57_0 выполните:

    bootstrap
    

    тогда:

    .b2
    

    в соответствии с инструкциями по 5.1 здесь. После этого у меня появилось сообщение о том, что «Библиотеки Boost C++ были успешно созданы!».

  • Добавьте C:boost_1_57_0 к моему пути. В инструкциях не говорится об этом, но поскольку они хотят, чтобы я вызывал бьям, и что там, где он живет, я предполагаю, что мне нужно это сделать.
  • Измените C:boost_1_57_0libspythonexamplequickstartboost-build.jam так, чтобы путь был boost-build../../../../tools/build/src ; и не boost-build../../../../tools/build/v2 ; , Это соответствует инструкциям здесь, так как исходный путь неправильный, и если вы этого не сделаете, вызов bjam терпит неудачу.
  • CD в C:boost_1_57_0libspythonexamplequickstart и запустить:

    bjam toolset=msvc --verbose-test test
    

Выход, который я получаю, во-первых:

...patience...
...patience...
...found 1926 targets...
...updating 55 targets...
common.mkdir bin
common.mkdir bintest_ext.test
common.mkdir bintest_ext.testmsvc-12.0
common.mkdir bintest_ext.testmsvc-12.0debug
common.mkdir bintest_ext.testmsvc-12.0debugthreading-multi
common.mkdir binmsvc-12.0
common.mkdir binmsvc-12.0debug
common.mkdir binmsvc-12.0debugthreading-multi
compile-c-c++ binmsvc-12.0debugthreading-multiextending.obj
extending.cpp
c:python27includepymath.h(22) : warning C4273: 'round' : inconsistent dll linkage
    C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(516) : see previous definition of 'round'
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDExtgmath.h(190) : warning C4273: '_hypot' : inconsistent dll linkage

за которым следует длинный список других записей в заголовочном файле, каждый из которых жалуется на несовместимость DLL-связи, а затем в конце появляется множество ошибок, основные моменты которых включают в себя:

LINK : fatal error LNK1207: incompatible PDB format in 'C:boost_1_57_0libspythonexamplequickstartbinmsvc-12.0debugthreading-multiextending.pdb'; delete and rebuild

...failed msvc.link.dll binmsvc-12.0debugthreading-multiextending.pyd binmsvc-12.0debugthreading-multiextending.pdb...
...removing binmsvc-12.0debugthreading-multiextending.pdb

LINK : warning LNK4001: no object files specified; libraries used
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
bintest_embed.testmsvc-12.0debugthreading-multitest_embed.exe : fatal error LNK1120: 1 unresolved externals

...failed msvc.link bintest_embed.testmsvc-12.0debugthreading-multitest_embed.exe bintest_embed.testmsvc-12.0debugthreading-multitest_embed.pdb...
...removing bintest_embed.testmsvc-12.0debugthreading-multitest_embed.pdb
...skipped <pbintest_embed.testmsvc-12.0debugthreading-multi>test_embed.run for lack of <pbintest_embed.testmsvc-12.0debugthreading-multi>test_embed.exe...
...failed updating 4 targets...

Есть идеи?

Понравилась статья? Поделить с друзьями:
  • Как найти химическое количество элемента в веществе
  • Как исправить ошибки в отчете по есв
  • Net helpmsg 3952 windows 10 как исправить
  • Как исправить форму носа при помощи упражнений
  • Как указать область определения найти нули функции