Disclosed is the use of N-[1,3,4-oxadiazol-2-yl]-2-phenyl-4-quinolinecarboxamide, N-[1,3,4-thiadiazol-2-yl]-2-phenyl-4-quinolinecarboxamide and N-[1,3,4-triazol-2-yl]-2-phenyl-4-quinolinecarboxamide derivatives as represented by the general formula (I) in the manufacture of a medicament for the treatment and/or prevention of cancer by inhibition of STAT3, wherein R2 is hydrogen or methyl R3 is a substituted or unsubstituted aryl group W is a single bond or an unsubstituted alkylene group X represents an oxygen atom, a sulphur atom, or NR34 and wherein the remaining substituents are as defined herein. Representative compounds of formula (I) include N-[5-(2-furyl)-1,3,4-oxadiazol-2-yl]-2-phenyl-4-quinolinecarboxamide, N-[5-(2-furyl)-1,3,4-oxadiazol-2-yl]-6-chloro-2-thienyl-4-quinolinecarboxamide, N-[5-(2-furyl)-1,3,4-oxadiazol-2-yl]-2-(4-(tert-butoxycarbonyl)phenyl)-4-quinolinecarboxamide, N-[5-(2-furyl)-1,3,4-oxadiazol-2-yl]-2-(1,3-benzodioxol-5-yl)-4-quinolinecarboxamide and N-[5-(2-furyl)-1,3,4-oxadiazol-2-yl]-6-bromo-2-(phenyl)-4-quinolinecarboxamide.