Hello,
I successfully built QuteCom with vc9.
But now I've got problems when I try to launch QuteCom.exe
It doesn't find some entry-points in WS2_32.dll (WSApoll, inet_top ...)
I'm not sure, but I think curl is build with a wrong target (Vista).
Attached a diff to build with vc9
Feedbacks are welcome !
Laurent
diff -r 88ae1e6d0e25 libs/owutil/util/String.h
--- a/libs/owutil/util/String.h Sat May 16 03:50:06 2009 +0200
+++ b/libs/owutil/util/String.h Wed Jul 01 06:20:32 2009 +0200
@@ -1,275 +1,275 @@
-/*
- * WengoPhone, a voice over Internet phone
- * Copyright (C) 2004-2006 Wengo
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef OWSTRING_H
-#define OWSTRING_H
-
-#include <util/owutildll.h>
-
-#include <string>
-
-class StringList;
-
-/**
- * std::string wrapper/helper.
- *
- * Inspired from the class QString from the Qt library.
- *
- * @see QString
- * @see std::string
- * @see java.lang.String
- * @author Tanguy Krotoff
- */
-class OWUTIL_API String : public std::string {
-public:
-
- /**
- * Null string.
- *
- * Rather than to code something like this:
- * if (myString == "")
- * it's better to write:
- * if (myString.empty())
- * return "" -> return String::null
- */
- static const char * null;
-
- String() : std::string() { }
-
- String(const char * str) : std::string(str) { }
-
- String(const std::string & str) : std::string(str) { }
-
- /**
- * Converts this String to std::string.
- *
- * @return the converted String to std::string
- */
- operator const std::string&() {
- return *this;
- }
-
- /**
- * Converts this string to an int.
- *
- * @return the string converted to an int or 0 if failed to convert
- */
- int toInteger() const;
-
- /**
- * Converts this string to a boolean.
- *
- * Detects strings: "true", "TRUE", "yes", "YES", "1"
- * "false", "FALSE", "no", "NO", "0"
- * Be very carefull when using this method, maybe it should throw an
Exception.
- *
- * @return the string converted to a boolean (return false if failed to
convert)
- */
- bool toBoolean() const;
-
- /**
- * Converts all of the characters in this string to lower case.
- *
- * Example:
- * <pre>
- * String myString("WengO");
- * str = myString.toLowerCase(); //str == "wengo"
- * </pre>
- *
- * @return the string converted to lowercase
- */
- std::string toLowerCase() const;
-
- /**
- * Converts all of the characters in this string to upper case.
- *
- * Example:
- * <pre>
- * String myString("WengO");
- * str = myString.toUpperCase(); //str == "WENGO"
- * </pre>
- *
- * @return the string converted to uppercase
- */
- std::string toUpperCase() const;
-
- /**
- * @param str the string to test
- * @return true if String begins with str
- */
- bool beginsWith(const String & str) const;
-
- /**
- * @param str the string to test
- * @return true if String ends with str
- */
- bool endsWith(const String & str) const;
-
- /**
- * Gets the number of occurences of the string str inside this string.
- *
- * @param str string to find
- * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
- * @return true if this list contains the specified element
- */
- bool contains(const std::string & str, bool caseSensitive = true)
const;
-
- /**
- * @see contains()
- */
- bool contains(char ch, bool caseSensitive = true) const;
-
- /**
- * Replaces every occurence of the string 'before' with the string
'after'.
- *
- * @param before occurence to find
- * @param after the string that will replace the string before
- * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
- */
- void replace(const std::string & before, const std::string & after,
bool caseSensitive = true);
-
- /**
- * Replaces first occurence of the string 'before' with the string
'after'.
- *
- * This version will only look for 'before' into the given range of the
string.
- *
- * @param index index of the first character of the substring to find in
- * @param size size of the substring to find in
- * @param before occurence to find
- * @param after the string that will replace the string before
- * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
- */
- void replaceInRange(unsigned index, unsigned size,
- const std::string & before, const std::string & after, bool
caseSensitive = true);
-
- /**
- * Appends a string onto the end of this string.
- *
- * @param str string to append
- * @return the new string
- */
- std::string & append(const std::string & str);
-
- /**
- * Removes every occurrence of str in the string.
- *
- * @param str to remove in the string
- */
- void remove(const std::string & str);
-
- /**
- * Gets a string from a number.
- *
- * @param number number to convert into a string
- * @param minLength minimal length of the string (i.e. fromNumber(15,
3) => "015")
- * @return number converted to a string
- */
- static std::string fromNumber(int number, int minLength = 0);
-
- /**
- * Gets a string from a boolean.
- *
- * @param boolean boolean to convert into a string
- * @return boolean converted to a string
- */
- static std::string fromBoolean(bool boolean);
-
- /**
- * Gets a string from an unsigned int.
- *
- * @param number unsigned int to convert into a string
- * @return unsigned int converted to a string
- */
- static std::string fromUnsignedInt(unsigned int number);
-
- /**
- * Gets a string from an double.
- *
- * @param number double to convert into a string
- * @return double converted to a string
- */
- static std::string fromDouble(double number);
-
- /**
- * Gets a string from a long.
- *
- * @param number long to convert into a string
- * @return long converted to a string
- */
- static std::string fromLong(long number);
-
- /**
- * Gets a string from a long long.
- *
- * @param number long long to convert into a string
- * @return long long converted to a string
- */
- static std::string fromLongLong(long long number);
-
- /**
- * Gets a string from a unsigned long long.
- *
- * @param number unsigned long long to convert into a string
- * @return unsigned long long converted to a string
- */
- static std::string fromUnsignedLongLong(unsigned long long number);
-
- /**
- * URL-encodes a string.
- *
- * @param url the string to encode
- * @return a string with all non-alphanumeric characters replaced by
their
- * URL-encoded equivalent.
- */
- static std::string encodeUrl(const std::string & url);
-
- /**
- * URL-decodes a string.
- *
- * @param url the URL-encoded string to decode
- * @return a string with all URL-encoded sequences replaced by their
- * ASCII equivalent
- */
- static std::string decodeUrl(const std::string & url);
-
- /**
- * Tokenizes the string with a delimiter of your choice.
- *
- * Example:
- * <pre>
- * String str("four");
- * StringList tokens = str.split(""); //tokens = "four"
- * String str("four roses");
- * StringList tokens = str.split(" "); //tokens = "four", "roses"
- * </pre>
- *
- * @param separator string delimiter
- * @return tokens, strings created by splitting the input string
- */
- StringList split(const std::string & separator) const;
-
- /**
- * Removes spaces at the beginning and the end of a string.
- *
- * @return a cleaned string
- */
- std::string trim();
-};
-
-#endif //OWSTRING_H
+/*
+ * WengoPhone, a voice over Internet phone
+ * Copyright (C) 2004-2006 Wengo
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef OWSTRING_H
+#define OWSTRING_H
+
+#include <util/owutildll.h>
+
+#include <string>
+
+class StringList;
+
+/**
+ * std::string wrapper/helper.
+ *
+ * Inspired from the class QString from the Qt library.
+ *
+ * @see QString
+ * @see std::string
+ * @see java.lang.String
+ * @author Tanguy Krotoff
+ */
+class String : public std::string {
+public:
+
+ /**
+ * Null string.
+ *
+ * Rather than to code something like this:
+ * if (myString == "")
+ * it's better to write:
+ * if (myString.empty())
+ * return "" -> return String::null
+ */
+ OWUTIL_API static const char * null;
+
+ OWUTIL_API String() : std::string() { }
+
+ OWUTIL_API String(const char * str) : std::string(str) { }
+
+ OWUTIL_API String(const std::string & str) : std::string(str) { }
+
+ /**
+ * Converts this String to std::string.
+ *
+ * @return the converted String to std::string
+ */
+ OWUTIL_API operator const std::string&() {
+ return *this;
+ }
+
+ /**
+ * Converts this string to an int.
+ *
+ * @return the string converted to an int or 0 if failed to convert
+ */
+ OWUTIL_API int toInteger() const;
+
+ /**
+ * Converts this string to a boolean.
+ *
+ * Detects strings: "true", "TRUE", "yes", "YES", "1"
+ * "false", "FALSE", "no", "NO", "0"
+ * Be very carefull when using this method, maybe it should throw an
Exception.
+ *
+ * @return the string converted to a boolean (return false if failed to
convert)
+ */
+ OWUTIL_API bool toBoolean() const;
+
+ /**
+ * Converts all of the characters in this string to lower case.
+ *
+ * Example:
+ * <pre>
+ * String myString("WengO");
+ * str = myString.toLowerCase(); //str == "wengo"
+ * </pre>
+ *
+ * @return the string converted to lowercase
+ */
+ OWUTIL_API std::string toLowerCase() const;
+
+ /**
+ * Converts all of the characters in this string to upper case.
+ *
+ * Example:
+ * <pre>
+ * String myString("WengO");
+ * str = myString.toUpperCase(); //str == "WENGO"
+ * </pre>
+ *
+ * @return the string converted to uppercase
+ */
+ OWUTIL_API std::string toUpperCase() const;
+
+ /**
+ * @param str the string to test
+ * @return true if String begins with str
+ */
+ OWUTIL_API bool beginsWith(const String & str) const;
+
+ /**
+ * @param str the string to test
+ * @return true if String ends with str
+ */
+ OWUTIL_API bool endsWith(const String & str) const;
+
+ /**
+ * Gets the number of occurences of the string str inside this string.
+ *
+ * @param str string to find
+ * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
+ * @return true if this list contains the specified element
+ */
+ OWUTIL_API bool contains(const std::string & str, bool caseSensitive =
true) const;
+
+ /**
+ * @see contains()
+ */
+ OWUTIL_API bool contains(char ch, bool caseSensitive = true) const;
+
+ /**
+ * Replaces every occurence of the string 'before' with the string
'after'.
+ *
+ * @param before occurence to find
+ * @param after the string that will replace the string before
+ * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
+ */
+ OWUTIL_API void replace(const std::string & before, const std::string
& after, bool caseSensitive = true);
+
+ /**
+ * Replaces first occurence of the string 'before' with the string
'after'.
+ *
+ * This version will only look for 'before' into the given range of the
string.
+ *
+ * @param index index of the first character of the substring to find in
+ * @param size size of the substring to find in
+ * @param before occurence to find
+ * @param after the string that will replace the string before
+ * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
+ */
+ OWUTIL_API void replaceInRange(unsigned index, unsigned size,
+ const std::string & before, const std::string & after, bool
caseSensitive = true);
+
+ /**
+ * Appends a string onto the end of this string.
+ *
+ * @param str string to append
+ * @return the new string
+ */
+ OWUTIL_API std::string & append(const std::string & str);
+
+ /**
+ * Removes every occurrence of str in the string.
+ *
+ * @param str to remove in the string
+ */
+ OWUTIL_API void remove(const std::string & str);
+
+ /**
+ * Gets a string from a number.
+ *
+ * @param number number to convert into a string
+ * @param minLength minimal length of the string (i.e. fromNumber(15,
3) => "015")
+ * @return number converted to a string
+ */
+ OWUTIL_API static std::string fromNumber(int number, int minLength =
0);
+
+ /**
+ * Gets a string from a boolean.
+ *
+ * @param boolean boolean to convert into a string
+ * @return boolean converted to a string
+ */
+ OWUTIL_API static std::string fromBoolean(bool boolean);
+
+ /**
+ * Gets a string from an unsigned int.
+ *
+ * @param number unsigned int to convert into a string
+ * @return unsigned int converted to a string
+ */
+ OWUTIL_API static std::string fromUnsignedInt(unsigned int number);
+
+ /**
+ * Gets a string from an double.
+ *
+ * @param number double to convert into a string
+ * @return double converted to a string
+ */
+ OWUTIL_API static std::string fromDouble(double number);
+
+ /**
+ * Gets a string from a long.
+ *
+ * @param number long to convert into a string
+ * @return long converted to a string
+ */
+ OWUTIL_API static std::string fromLong(long number);
+
+ /**
+ * Gets a string from a long long.
+ *
+ * @param number long long to convert into a string
+ * @return long long converted to a string
+ */
+ OWUTIL_API static std::string fromLongLong(long long number);
+
+ /**
+ * Gets a string from a unsigned long long.
+ *
+ * @param number unsigned long long to convert into a string
+ * @return unsigned long long converted to a string
+ */
+ OWUTIL_API static std::string fromUnsignedLongLong(unsigned long long
number);
+
+ /**
+ * URL-encodes a string.
+ *
+ * @param url the string to encode
+ * @return a string with all non-alphanumeric characters replaced by
their
+ * URL-encoded equivalent.
+ */
+ OWUTIL_API static std::string encodeUrl(const std::string & url);
+
+ /**
+ * URL-decodes a string.
+ *
+ * @param url the URL-encoded string to decode
+ * @return a string with all URL-encoded sequences replaced by their
+ * ASCII equivalent
+ */
+ OWUTIL_API static std::string decodeUrl(const std::string & url);
+
+ /**
+ * Tokenizes the string with a delimiter of your choice.
+ *
+ * Example:
+ * <pre>
+ * String str("four");
+ * StringList tokens = str.split(""); //tokens = "four"
+ * String str("four roses");
+ * StringList tokens = str.split(" "); //tokens = "four", "roses"
+ * </pre>
+ *
+ * @param separator string delimiter
+ * @return tokens, strings created by splitting the input string
+ */
+ OWUTIL_API StringList split(const std::string & separator) const;
+
+ /**
+ * Removes spaces at the beginning and the end of a string.
+ *
+ * @return a cleaned string
+ */
+ OWUTIL_API std::string trim();
+};
+
+#endif //OWSTRING_H
diff -r 88ae1e6d0e25 libs/owutil/util/StringList.h
--- a/libs/owutil/util/StringList.h Sat May 16 03:50:06 2009 +0200
+++ b/libs/owutil/util/StringList.h Wed Jul 01 06:20:32 2009 +0200
@@ -1,149 +1,149 @@
-/*
- * WengoPhone, a voice over Internet phone
- * Copyright (C) 2004-2006 Wengo
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef OWSTRINGLIST_H
-#define OWSTRINGLIST_H
-
-#include <util/owutildll.h>
-#include <util/List.h>
-
-#include <string>
-#include <list>
-
-/**
- * std::list<std::string> wrapper/helper.
- *
- * Inspired from the class QStringList from the Qt library.
- *
- * For converting a StringList object to a QStringList,
- * check libqtutil.
- *
- * @see QStringList
- * @see std::list
- * @author Tanguy Krotoff
- */
-
-class OWUTIL_API StringList : public List<std::string> {
-public:
-
- static StringList null;
-
- StringList();
- ~StringList();
-
- /**
- * Converts a std::list<std::string> to a StringList using a
constructor.
- *
- * @param strList list<string> to convert to StringList
- */
- StringList(const std::list<std::string> & strList);
-
- /**
- * Converts this StringList to std::list<std::string>.
- *
- * @return the converted StringList to std::list<std::string>
- */
- operator std::list<std::string>();
-
- /**
- * Permits to use StringList as an array.
- *
- * @see List::operator[]
- * @param i index inside the array
- * @return the std::string that corresponds to the index i inside the
StringList
- * or String::null if index i is bigger than length()
- */
- std::string operator[](unsigned i) const;
-
- /**
- * @see List::operator+=
- */
- void operator+=(const StringList & strList);
-
- /**
- * @see List::operator+=
- */
- void operator+=(const std::string & str);
-
- /**
- * Gets the number of occurrences of a string contained inside the
StringList.
- *
- * Example:
- * <pre>
- * StringList strList;
- * strList += "wengo";
- * strList += "is";
- * strList += "good";
- * strList += "wengo";
- * unsigned int i = strList.contains("wengo"); //i = 2
- * unsigned int j = strList.contains("Wengo"); //j = 0
- * unsigned int k = strList.contains("Wengo", false); //k = 2
- * </pre>
- *
- * @param str value to look up inside the StringList
- * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
- * @return number of occurences of the value str inside the StringList
(0 if no occurence)
- */
- unsigned contains(const std::string & str, bool caseSensitive = true)
const;
-
- /**
- * Joins the string list into a single string given a separator.
- *
- * @param separator string delimiter
- * @return the joined string with each element separated by the
separator
- */
- std::string join(const std::string & separator) const;
-
- enum SortingOrder {
- Ascendant,
- Descendant
- };
-
- /**
- * Sorts the string list alphabetically.
- *
- * @param order sorting order
- */
- void sort(SortingOrder order = Ascendant);
-
- /**
- * Removes duplicated strings if any.
- */
- void removeDuplicatedStrings();
-
- /**
- * Constructs a single string from every string
- * contained in this StringList.
- *
- * @param separator the separator used to constructs the string
- * @return the resulting string
- */
- std::string toString(const std::string & separator = " ") const;
-
-private:
-
- class StringCompareDescendant {
- public:
- bool operator()(const std::string & s1, const std::string & s2)
{
- return s2 < s1;
- }
- };
-};
-
-#endif //OWSTRINGLIST_H
+/*
+ * WengoPhone, a voice over Internet phone
+ * Copyright (C) 2004-2006 Wengo
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef OWSTRINGLIST_H
+#define OWSTRINGLIST_H
+
+#include <util/owutildll.h>
+#include <util/List.h>
+
+#include <string>
+#include <list>
+
+/**
+ * std::list<std::string> wrapper/helper.
+ *
+ * Inspired from the class QStringList from the Qt library.
+ *
+ * For converting a StringList object to a QStringList,
+ * check libqtutil.
+ *
+ * @see QStringList
+ * @see std::list
+ * @author Tanguy Krotoff
+ */
+
+class StringList : public List<std::string> {
+public:
+
+ OWUTIL_API static StringList null;
+
+ OWUTIL_API StringList();
+ OWUTIL_API ~StringList();
+
+ /**
+ * Converts a std::list<std::string> to a StringList using a
constructor.
+ *
+ * @param strList list<string> to convert to StringList
+ */
+ OWUTIL_API StringList(const std::list<std::string> & strList);
+
+ /**
+ * Converts this StringList to std::list<std::string>.
+ *
+ * @return the converted StringList to std::list<std::string>
+ */
+ OWUTIL_API operator std::list<std::string>();
+
+ /**
+ * Permits to use StringList as an array.
+ *
+ * @see List::operator[]
+ * @param i index inside the array
+ * @return the std::string that corresponds to the index i inside the
StringList
+ * or String::null if index i is bigger than length()
+ */
+ OWUTIL_API std::string operator[](unsigned i) const;
+
+ /**
+ * @see List::operator+=
+ */
+ OWUTIL_API void operator+=(const StringList & strList);
+
+ /**
+ * @see List::operator+=
+ */
+ OWUTIL_API void operator+=(const std::string & str);
+
+ /**
+ * Gets the number of occurrences of a string contained inside the
StringList.
+ *
+ * Example:
+ * <pre>
+ * StringList strList;
+ * strList += "wengo";
+ * strList += "is";
+ * strList += "good";
+ * strList += "wengo";
+ * unsigned int i = strList.contains("wengo"); //i = 2
+ * unsigned int j = strList.contains("Wengo"); //j = 0
+ * unsigned int k = strList.contains("Wengo", false); //k = 2
+ * </pre>
+ *
+ * @param str value to look up inside the StringList
+ * @param caseSensitive the search is case sensitive; otherwise the
search is case insensitive
+ * @return number of occurences of the value str inside the StringList
(0 if no occurence)
+ */
+ OWUTIL_API unsigned contains(const std::string & str, bool
caseSensitive = true) const;
+
+ /**
+ * Joins the string list into a single string given a separator.
+ *
+ * @param separator string delimiter
+ * @return the joined string with each element separated by the
separator
+ */
+ OWUTIL_API std::string join(const std::string & separator) const;
+
+ OWUTIL_API enum SortingOrder {
+ Ascendant,
+ Descendant
+ };
+
+ /**
+ * Sorts the string list alphabetically.
+ *
+ * @param order sorting order
+ */
+ OWUTIL_API void sort(SortingOrder order = Ascendant);
+
+ /**
+ * Removes duplicated strings if any.
+ */
+ OWUTIL_API void removeDuplicatedStrings();
+
+ /**
+ * Constructs a single string from every string
+ * contained in this StringList.
+ *
+ * @param separator the separator used to constructs the string
+ * @return the resulting string
+ */
+ OWUTIL_API std::string toString(const std::string & separator = " ")
const;
+
+private:
+
+ class StringCompareDescendant {
+ public:
+ bool operator()(const std::string & s1, const std::string & s2)
{
+ return s2 < s1;
+ }
+ };
+};
+
+#endif //OWSTRINGLIST_H
_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev