<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: Dudebbing windows externs in MSVC</title>
		<atom:link href="http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/feed</link>
		<description></description>
		<pubDate>Thu, 20 Jun 2013 03:18:09 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-38331</guid>
					<title><![CDATA[Dudebbing windows externs in MSVC]]></title>
					<link>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-38331</link>
					<pubDate>Wed, 11 Jun 2008 05:57:05 +0000</pubDate>
					<dc:creator>martinrobinson</dc:creator>

					<description>
						<![CDATA[
						<p>Hello,</p>
<p>Could anyone give me a quick outline of how to debug a extern for Max on Windows using MS VC++ Express? </p>
<p>I should probably outline how I get this working on the Mac in case it bears no resemblance to the process on Windows.</p>
<p>I&#8217;m familiar with doing this in Xcode by setting the custom executable environment as the MaxMSPRuntime which GDB then attaches to when doing build->debug. Then I usually drag and drop the external I want to debug onto the MaxMSPRuntime. This loads the external and I get any debug messages (in the console output back in Xcode) that I generate in main() using printf() or similar. Finally I load a pre-built patch that tests the extern and again I get any debug messages.</p>
<p>In MSVC I have tried launching MaxMSPRntime then attaching MSVC&#8217;s debugger using Debug->Attach&#8230;. Then, as on the Mac, I drag and drop the extern and load the pre-built patch. This gives me post() messages in Max but I don&#8217;t get any printf() debug messages in the debugger output back in MSVC. I can only assume it&#8217;s not attaching correctly.</p>
<p>Any hints?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-133423</guid>
					<title><![CDATA[Re: Dudebbing windows externs in MSVC]]></title>
					<link>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-133423</link>
					<pubDate>Wed, 11 Jun 2008 20:29:01 +0000</pubDate>
					<dc:creator>thezer0ist@gmail.com</dc:creator>

					<description>
						<![CDATA[
						<p>i&#8217;ve used msvc to debug externals when they cause a crash&#8230; there&#8217;s that &#8220;kill program or debug&#8221; message box that pops up, which brings you to another one that allows you to attach an instance of msvc. i&#8217;m not sure how to get it to debug without a crash though.<br />
my guess is that stuff like printf wouldn&#8217;t really work there anyway&#8230; i&#8217;m not sure that the debugger connects to the max standard i/o streams, which it would need to do for that stuff to work.<br />
in a worst case scenario, you could just use a log file&#8230;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-133424</guid>
					<title><![CDATA[Re: Dudebbing windows externs in MSVC]]></title>
					<link>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-133424</link>
					<pubDate>Thu, 12 Jun 2008 09:09:14 +0000</pubDate>
					<dc:creator>martinrobinson</dc:creator>

					<description>
						<![CDATA[
						<p>&#8230;I just noticed my rather interesting spelling of debugging in the original post&#8230; anyway:</p>
<p>Thanks, thezer0ist I guess I&#8217;ll need to use a log file unless someone knows how to get similar behaviour to Xcode. I don&#8217;t want to use post() since the problem I&#8217;m having is in inside some C++ class where I don&#8217;t want to include the MaxAPI, ext.h etc.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-133425</guid>
					<title><![CDATA[Re: Dudebbing windows externs in MSVC]]></title>
					<link>http://cycling74.com/forums/topic/dudebbing-windows-externs-in-msvc/#post-133425</link>
					<pubDate>Sat, 14 Jun 2008 11:55:53 +0000</pubDate>
					<dc:creator>thezer0ist@gmail.com</dc:creator>

					<description>
						<![CDATA[
						<p>my approach to that kind of thing has always been a combination of wrapper functions and variadic macros, which allow me to switch the debug output from one method to another simply by changing a single #define statement&#8230;</p>
<p>
something like&#8230;</p>
<p>void _dbg_print_log(const char *fmt, &#8230;)<br />
{<br />
  print message to log file<br />
}</p>
<p>void _dbg_print_max(const char *fmt, &#8230;)<br />
{<br />
  print message using post()<br />
}</p>
<p>#ifdef DEBUG_OUT_MAX<br />
#define dbg_print(fmt, &#8230;) _dbg_print_max(fmt, __VAR_ARGS)<br />
#else<br />
#define dbg_print(fmt, &#8230;) _dbg_print_log(fmt, __VAR_ARGS)<br />
#endif</p>
<p>
i&#8217;m not sure about the syntax of the macros&#8230; i generally end up spending a few minutes looking at reference materials for stuff like __VAR_ARGS (which i&#8217;m sure is supposed to be something else)</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

