<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=413246</guid>
        <pubDate>Wed, 28 Jul 2004 12:36:26 +0000</pubDate>
        <title>error LNK2005 (vs6)</title>
        <link>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=413246</link>
        <description><![CDATA[nastenka: я уж где-то раньше писала, так что извините за повторение, в любом случае не вредит в dependency walker посмотрет, там &quot;какие&quot; и &quot;где&quot; библиотеки лежат. варнинги тож не дело...]]></description>
        <author>nastenka</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=413215</guid>
        <pubDate>Wed, 28 Jul 2004 12:12:38 +0000</pubDate>
        <title>error LNK2005 (vs6)</title>
        <link>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=413215</link>
        <description><![CDATA[pushistik: кто знает...у меня вроде конфликтовал статическая библиотека с динамическим приложением  :wacko: -&gt; отрубил библиотеки- вроде не ругается, окромя варнинга]]></description>
        <author>pushistik</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412817</guid>
        <pubDate>Wed, 28 Jul 2004 06:52:50 +0000</pubDate>
        <title>error LNK2005 (vs6)</title>
        <link>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412817</link>
        <description><![CDATA[Fester: А может дело не в мультитреде?<br>
<br>
<a class='tag-url' href='http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK2005.asp' target='_blank'>LNK2005</a> возникает больше, чем в одном случае...]]></description>
        <author>Fester</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412782</guid>
        <pubDate>Wed, 28 Jul 2004 06:20:49 +0000</pubDate>
        <title>error LNK2005 (vs6)</title>
        <link>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412782</link>
        <description><![CDATA[pushistik: спасибо за код, ща попробую:)]]></description>
        <author>pushistik</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412371</guid>
        <pubDate>Tue, 27 Jul 2004 16:09:45 +0000</pubDate>
        <title>error LNK2005 (vs6)</title>
        <link>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412371</link>
        <description><![CDATA[Dr_Timas: Может быть есть смысл добавить GUI без использования MFC. То есть, я имею ввиду написать скелет приложения, компилировать его как win32, а все элементы вставлять с помощью CreateWindowEx. Например:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">#include &#60;windows.h&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">LRESULT CALLBACK WindowFunc(HWND, UINT, WPARAM, LPARAM); &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;char szWinName[]=&quot;MyWin&quot;;</div><div class="code_line">&nbsp;</div><div class="code_line">int WINAPI WinMain(HINSTANCE hThisInst,HINSTANCE hPrevInst, LPSTR lpszArgs, int nWinMode)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;HWND hwnd;</div><div class="code_line">&nbsp;&nbsp; &nbsp;MSG msg;</div><div class="code_line">&nbsp;&nbsp; &nbsp;WNDCLASSEX wcl;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.cbSize=sizeof(WNDCLASSEX);</div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.hInstance=hThisInst; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.lpszClassName=szWinName; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.lpfnWndProc=WindowFunc; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.style=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.hIcon=LoadIcon(NULL,IDI_APPLICATION); &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.hIconSm=NULL; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.hCursor=LoadCursor(NULL,IDC_ARROW); &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.lpszMenuName=NULL; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.cbClsExtra=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.cbWndExtra=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;wcl.hbrBackground=(HBRUSH) GetStockObject(BLACK_BRUSH);</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if(!RegisterClassEx(&amp;wcl)) return 0;</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;/*hwnd=CreateWindow(szWinName, &quot;Title&quot;,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;WS_POPUP|WS_SYSMENU, 0, 0,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;GetSystemMetrics(SM_CXSCREEN),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;GetSystemMetrics(SM_CYSCREEN),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;0, 0, hThisInst, 0);*/</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;hwnd = CreateWindow( &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;szWinName, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&quot;Skelet for Uchebnik&quot;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;WS_OVERLAPPEDWINDOW, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CW_USEDEFAULT, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CW_USEDEFAULT, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CW_USEDEFAULT, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CW_USEDEFAULT, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;NULL, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;NULL, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;hThisInst, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;NULL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;CreateWindowEx(NULL,&quot;button&quot;,&quot;1&quot;,WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,10,10,70,70,hwnd,(HMENU)100,hThisInst,NULL);</div><div class="code_line">&nbsp;&nbsp; &nbsp;CreateWindowEx(NULL,&quot;edit&quot;, &quot;Хрен&quot;,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; WS_CHILD | WS_VISIBLE | WS_BORDER ,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100, 50, 200, 20, hwnd, (HMENU)111, hThisInst, NULL);</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ShowWindow(hwnd,nWinMode);</div><div class="code_line">&nbsp;&nbsp; &nbsp;UpdateWindow(hwnd);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;while(GetMessage(&amp;msg, NULL, 0,0))</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;TranslateMessage(&amp;msg);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;DispatchMessage(&amp;msg);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;return msg.wParam;</div><div class="code_line">}</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">LRESULT CALLBACK WindowFunc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;switch(message){</div><div class="code_line">&nbsp;&nbsp; &nbsp;case WM_PAINT: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;UpdateWindow(hwnd); &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;break;</div><div class="code_line">&nbsp;&nbsp; &nbsp;case WM_DESTROY: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;PostQuitMessage(0);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;break; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;default: &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return DefWindowProc(hwnd, message, wParam,lParam);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;return 0;</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
А прогу твою запихать/внедрить в этот шаблон (я имею ввиду код). Не бей, если я что-то не так понял. С похмелья туго соображаю...<br>
<br>
:blink: <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='8' style='font-size:8pt;'><strong class='tag-b'>Добавлено в <time class="tag-mergetime" datetime="2004-07-27T16:14:29+00:00">27.07.04, 16:14</time></strong>:</span></span><br>
Ну если warningi, то это уже не так страшно. Программа конечно будет запускаться, но вот будет ли работать правильно? Проверь, если все верно, то не стоит переживать... Блин, башка болит <br>
 :unsure:<br>
<br>
<div class="tag-mod"><div class="tag-mod__prefix">M</div><div class="tag-mod__body">Пользуйтесь тегом кода.<br>
Предупреждение не ставлю т.к. новичок.<br>
Подсказка в ссылке &#34;Помощь по кодам форума&#34; слева формы ответа.<br>
Leprecon</div></div>]]></description>
        <author>Dr_Timas</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412325</guid>
        <pubDate>Tue, 27 Jul 2004 15:04:20 +0000</pubDate>
        <title>error LNK2005 (vs6)</title>
        <link>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412325</link>
        <description><![CDATA[pushistik: Update: <br>
написал /nodefaultlib:&quot;msvcrtd.lib&quot; /nodefaultlib:&quot;msvcirtd.lib&quot; /nodefaultlib:&quot;msvcprtd.lib&quot;- ошибки ушли, только появились ворнинги<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">LINK : warning LNK4049: locally defined symbol &quot;&quot;public: __thiscall std::_Winit::_Winit(void)&quot; (??0_Winit@std@@QAE@XZ)&quot; imported</div></ol></div></div></div></div><br>
как это будет влиять на ход программы?]]></description>
        <author>pushistik</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412199</guid>
        <pubDate>Tue, 27 Jul 2004 13:13:28 +0000</pubDate>
        <title>error LNK2005 (vs6)</title>
        <link>https://forum.sources.ru/index.php?showtopic=60917&amp;view=findpost&amp;p=412199</link>
        <description><![CDATA[pushistik: Написал программульку которая чего-то там считает(физику разную), основываясь на библиотеках некоего CLHep (может кто физик- о такой штуке слышал).<br>
В console application она у меня все считает.<br>
Потом решил попробовать Гуи добавить...в MFC я полный нуб, поэтому пошел на firststeps и взял из первых шагов в разделе Visual C++ примерчик, который кнопочки рисует. Ну долго не думая, добавил этот примерчик в мой воркспейс и в  нажатии на кнопку просто вызвал мою прогу <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">void CMyButton::OnLButtonDblClk(UINT, CPoint)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;Generate::Run1(mean,deviat,nEvents,nBins,maxQ,Qinv_user,chiSq,Corr); // вызов моей рутины</div><div class="code_line">&nbsp;&nbsp; &nbsp;MoveWindow(CRect(120,100,220,150),TRUE);// то что предлагают сделать в примере на firststeps</div><div class="code_line">}</div></ol></div></div></div></div><br>
Ну и понятное дело выскочила куча ошибок LNK2005(куда ж без них) типа вот таких<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">LIBCMTD.lib(dbgheap.obj) : error LNK2005: _free already defined in msvcrtd.lib(MSVCRTD.dll)</div><div class="code_line">libcpmtd.lib(iostream.obj) : error LNK2005: &quot;public: __thiscall std::ios_base::Init::~Init(void)&quot; (??1Init@ios_base@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)</div><div class="code_line">LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)</div><div class="code_line">svcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in LIBCMTD.lib(mbctype.obj)</div></ol></div></div></div></div><br>
<br>
Ну я по колесу постучал, дворники протер :) (мультитритед везде поставил, перебилдил, прекомпайлед хедерс убрал) а  ошибки так и остались.<br>
<br>
Причем как я понимаю MSVCRTD.dll и LIBCMTD.lib лежат одна в папке windows, другая в библиотеках visual studio(поиск фарева).<br>
<br>
В чем может быть ошибка? может кто на заре своей деятельности сталкивался? или в мфц все принципиально не так делается?]]></description>
        <author>pushistik</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      </channel>
      </rss>
	